[erlang-questions] separators before end

Robert Virding rvirding@REDACTED
Wed Sep 19 23:46:41 CEST 2007


This is, of course, the correct observation, ; and , are separators not
terminators.

; is a sequential or SEPARATOR and it is consistently used as such whether
in guards or function/if/case/receive clauses.

For , the situation is not as clear. It is both a sequential separator
between expressions and an argument/element separator.

We wanted to allow sequences of expressions in clauses without having to
wrap them with begin/end as you do in for example C. C has , as an argument
separator and ; as a statement terminator.

If these were GOOD choices is a completely different matter. I personally am
so used to it that it is not a problem and I don't really see the problem.
:-)

Robert


On 19/09/2007, Minsloc Tarren <minsloc@REDACTED> wrote:
>
> But why would anybody want this ?
> If the meaning of the code doesn't change, the only thing is everybody
> would be forced to type extra characters (and it's the de-facto standard to
> use semicolon as separator or end-statement character, this would only
> confuse newcomers.
>
> Same goes for the if example, 4 semicolons instead of 3  (I'm not counting
> the one serving as an and).
>
> The rule is simple, _separate_ expressions with "," and branches with ";".
>
> Or bring forth a SOUND argument that will convince all of those who are
> used to this kind of notation for years (I'm not an long time erlanger, but
> this was a no-brainer, seemed just natural and logical) that there is real
> benefit to it (other then that you would cut-and-paste your "programs"
> together twice as fast ;-)))))))
>
> Just try to go to java forum and convince them to switch to prefix
> notation (or just shout as loud as you can "Lisp, Smalltalk, Ruby, dynamic
> typing" etc, either will get your ass busted ;-))))).
>
>
> On 9/19/07, Doug Edmunds <dougedmunds@REDACTED> wrote:
> >
> > Perhaps Erlang should be more like Español:
> >
> > ¿No problema?
> > ¡ No problema!
> >
> >
> > On 9/19/07, Joe Armstrong < erlang@REDACTED> wrote:
> > >
> > > ,What about English, should we also have leading commas?
> > >
> > >
> > _______________________________________________
> > 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070919/c3ea6fee/attachment.htm>


More information about the erlang-questions mailing list