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

> main: () -> int = {

Y U NO fn??!? So close, and yet so obviously wrong.



Why add a keyword when you don't need it?


One answer would be: So that when you hit the ( you know it's a list of parameters and not an expression, even before you spot the ->

I still haven't read enough about syntax 2 to understand if it allows any other use of ( after a : but if yes, a keyword like fn or fun would make the parser much more regular.


For easier grepping


Use an IDE


I'm not sure that any IDEs support cppfront yet!


fn is no fun




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

Search: