« Return to Thread: comma vs andalso

comma vs andalso

by Joel Reymont :: Rate this Message:

Reply to Author | View in Thread

I noticed that inets code uses

foo(...) when Condition1 andalso Condition2 -> ...

Is the comma deprecated? For example, why not

foo(...) when Condition1, Condition2 -> ...

A related pet peeve of mine is that the following does not properly  
indent in the latest Emacs mode

handle_info({tcp, Socket, Bin}, State)
   when State#state.transport /= undefined,
State#state.socket == Socket ->
...

I have to manually insert spaces to align State#state... above and  
using andalso above does not help either.

        Thanks, Joel

---
Mac hacker with a performance bent
http://www.linkedin.com/in/joelreymont


________________________________________________________________
erlang-questions mailing list. See http://www.erlang.org/faq.html
erlang-questions (at) erlang.org

 « Return to Thread: comma vs andalso