Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
webjprgm
on May 8, 2015
|
parent
|
context
|
favorite
| on:
The Earl Grey programming language
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
on May 8, 2015
[–]
I 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
on May 9, 2015
|
parent
[–]
I suppose. Kinda like => for "maps to" in some math / theory classes.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: