receive statement in Erlang

Sean Hinde Sean.Hinde@REDACTED
Thu May 17 10:58:00 CEST 2001


Vance:

> And I can't skip the opportunity to complain about tabs vs. spaces. :)
> You mix them here which I find makes things hard to read.  Especially
> when you aren't consistent!  I know this is my particular rant but let
> me leave you with this:
> 
>     receive
>         Screenpid ->
> 		    	link(Screenpid)
>         end,
> 
> Should be:
> 
> 	receive
> 		Screenpid ->
> 			link(Screenpid)
> 	end,

I really don't think it is possible to nicely format Erlang code without
using spaces. What about:

function_with_lots_of_parameters(Param1, Param2, Parameter_with_long_name,
					   Another_long_parameter,
Final_parameter) ->

And many other times where a bunch of things go across multiple lines but
need to be indented up to their buddies.

Emacs deals with this by tabbing until nearly there and then adding spaces
(all with a single press of the TAB key). It might be even better to set it
up to use just spaces for consistency with other editors but I just use
Emacs..

Regards,
Sean



NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.





More information about the erlang-questions mailing list