On 2012-06-11, Rugxulo <
rug...@gmail.com> wrote:
>> Tcl does this too. Very frustrating and seemingly pointless.
>
> Welcome to the bracing wars: stylistic arguments, and syntax
> woes! ;-)
>
> I know of two potential reasons for this (besides personal taste):
>
> 1). Emacs requires { } to be on separate lines in order to recognize
> the functions as functions (for use with certain built-in key
> bindings).
> 2). Google's Go used similar syntax because it wanted to avoid tons of
> semicolons as statement terminators (a la BCPL ??), so some
> terminators are implied "behind the scenes", hence the syntax
> restriction of { on same line as function name.
> (I'm probably describing it vaguely incorrectly, but you get the idea.)
I don't think that is true. You could use the whitespace as separator and
then define whitespace as set of [space,tab,cr,lf].
In general, I think it is simply a leftover of linebased scanning where
linefeeds had meaning. ( vs scanning of a token stream).
It might be that Emacs default parser was linebased. In the case of GO that
is less logical, since it is so new.