[erlang-questions] separators before end

David Mercer dmercer@REDACTED
Wed Sep 19 22:30:05 CEST 2007


See http://www.erlang.org/pipermail/erlang-questions/2007-August/028516.html
for my reasons.

Cheers,

David

-----Original Message-----
From: Joe Armstrong [mailto:erlang@REDACTED] 
Sent: Wednesday, September 19, 2007 14:45
To: dmercer@REDACTED
Cc: Erlang-Questions (E-mail)
Subject: Re: [erlang-questions] separators before end

,What about English, should we also have leading commas?

I agree with Orwell (rule 3).

/Joe

On 9/19/07, David Mercer <dmercer@REDACTED> wrote:
> > The fact that Erlang doesn't *HAVE* statements.  It only has
> > expressions.  What is the value of an empty expression?
>
> Good point.
>
> > Where Erlang *does* need to allow extra semicolons is at the
> > *beginnings* of ifs, cases, and receives, so you can write
> >       case e0 of
> >         ; p1 when g1 -> e1
> >         ; ...
> >         ; pn when gn -> en
> >       end
> > and be sure of having your punctuation right.
>
> I prefer this, too.
>
> Cheers,
>
> David
>
>
> -----Original Message-----
> From: erlang-questions-bounces@REDACTED
> [mailto:erlang-questions-bounces@REDACTED] On Behalf Of ok
> Sent: Wednesday, September 19, 2007 01:00
> To: Erlang-Questions (E-mail)
> Subject: Re: [erlang-questions] separators before end
>
>
> On 19 Sep 2007, at 3:33 pm, Doug Edmunds wrote:
>
> > Can someone tell me why it would be so difficult for Erlang
> > to allow commas and semi-colons before the word ''end"?
>
> Syntactically it would be easy.
> >
> > If there is a syntax error waiting to happen it is doing
> > a copy/paste that doesn't add or take away a comma or
> > semi-colon.
>
> This doesn't happen to me, but I'm not a *heavy* user of Erlang,
> so evidence from people who are would be useful.
> > What is so bad about having an empty statement?
>
> The fact that Erlang doesn't *HAVE* statements.  It only has
> expressions.  What is the value of an empty expression?
> Should
>         if ... -> E1, ; ... -> En, ; end
> have the same value as
>         if ... -> E1 ; ... -> En end
> and if so, how come the empty expression has so many different values?
> If not, why not?
>
> Where Erlang *does* need to allow extra semicolons is at the
> *beginnings* of ifs, cases, and receives, so you can write
>         case e0 of
>           ; p1 when g1 -> e1
>           ; ...
>           ; pn when gn -> en
>         end
> and be sure of having your punctuation right.
>
> >
> >
> > --dae
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>




More information about the erlang-questions mailing list