Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A lot of programmers will look at '`impl Fn(&Vec<&'a str>) -> &'a str`' and think what the hell is that, alien hieroglyphics?


Loosely speaking, it’s a type signature for a function that

1. takes an immutable reference to a vector of strings and

2. returns an immutable reference to a string,

3. with the constraint that the strings in the input vector must not be freed before the result is freed.

It’s a reasonably concise way of saying all that.


I'm pretty sure I never want to have anything to do with any of these concepts, no matter the syntax.


Same for APL, Perl, Lisp, Haskell and many others, or even C with multiple (double or triple) pointers and C++ with many pointer types.

At the end of the day, you can't understand a language without, well, learning it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: