Hacker News new | past | comments | ask | show | jobs | submit login

If you go back to http://learnyousomeerlang.com/starting-out-for-real :

In the Erlang shell, expressions have to be terminated with a period followed by whitespace (line break, a space etc.)

Maybe I should try to make it even more apparent (or add a picture). I can remember being stumped by the same thing when I first got to try the shell.




one of the trickiest things i found about basic erlang syntax was difference between "," and "and" and "andalso" as guard clause separators.


You'll be glad to know I explain the differences in the Syntax in function chapter of the book. http://learnyousomeerlang.com/syntax-in-functions#guards-gua...

Scroll down to the 'note' to see it. I don't explain 'and' vs 'andalso' though, but they are mentioned in an earlier chapter: 'and' will evaluate both its arguments, but 'andalso' will only do so when needed.

I still don't understand why Erlang doesn't allow the nesting of "," and ";" (which would make 'andalso' and 'orelse' useless in guards). There seems to be no plan to change that, even if big names [in the community] like Richard O'Keefe would like the same thing.



Yeah, it's where I got the difference too. I decided to add it to LYSE after that.


one other thing i noted:

(Modules page just above "More about modules") you talk about compiling to Hipe, but it doesn't say that you ahve to ./configure it in. This seems to be a common configure:

./configure --enable-hipe --enable-smp-support --enable-threads




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: