3 ms·
I'm not a fan of using -> like CoffeeScript does. It doesn't seem to mean function-body / algorithm-to-do-the-thing to me. That operator makes sense for pointer
by webjprgm 11y ago
I'm not a fan of using -> like CoffeeScript does. It doesn't seem to mean function-body / algorithm-to-do-the-thing to me. That operator makes sense for pointers or for function return value type expressions.
- breuleux 11y agoI think that's just because you are used to see it used that way. And it's not like CoffeeScript invented this. Haskell does it: \x -> x + 1 OCaml does it: fun (x : int) -> x + 1 It is very common in functional languages to use -> both for function bodies and return types.
- webjprgm 11y agoI suppose. Kinda like => for "maps to" in some math / theory classes.