Re:On Erlang's Syntax
by pixie_ on Thursday December 22, 2011 @09:52AM
(#3381662)
tldr - The user simply reads , as 'and', ; as 'or' and . as being done.
[ Parent
| on HN ]
Re:On Erlang's Syntax
by RichClaxton on Thursday December 22, 2011 @10:43AM
(#3381843)
That is a really nice summation.
This syntax isn't any less weird than C's &&, ||, and ; operators. :)
Do any C/C++ developers #include<iso646.h> so they can use and, or, and not as friendly operator names? This seems like a simple step for prettier C code, but I have never seen it in practice.
Re:On Erlang's Syntax
by sausagefeet on Thursday December 22, 2011 @02:21PM
(#3382862)
I've been writing C/C++ before and thought it would be nice to use those forms of the operators, but having never ever seen C++ code that does I wonder if I'm setting myself to be made fun of.
I guess it's a slippery slope. If people #define and && then someone else will #define then { and #define endif }. Everyone will have their own silly dialect. In fact, that is not unlike the current state of C++ usage..