4 ms·
If you go back to http://learnyousomeerlang.com/starting-out-for-real http://learnyousomeerlang.com/starting-out-for-real : In the Erlang shell, expressions ha
by mononcqc 17y ago
If you go back to http://learnyousomeerlang.com/starting-out-for-real 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.
- gtani 17y agoone of the trickiest things i found about basic erlang syntax was difference between "," and "and" and "andalso" as guard clause separators.
- mononcqc 17y agoYou'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-guards 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.
- gtani 17y agoreading this thread a few times helped http://www.nabble.com/Reading%2C-Learning%2C-Confused-to18544670.html#a18544670 http://www.nabble.com/Reading%2C-Learning%2C-Confused-to1854...
- mononcqc 17y agoYeah, it's where I got the difference too. I decided to add it to LYSE after that.
- gtani 17y agoone 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