On Sat, Jul 29, 2017 at 7:36 PM <ecstatic.co...@gmail.com> wrote:

> But as Gofmt can ALREADY enforces this common coding style, and can be
run at any time, including before committing code on the depots, why should
it be enforced by the COMPILER too ?

Let me pick just one misconception. The compiler does not care about
formatting style at all - because it cannot see it! Token sequences have no
style as they contain no white space or any other kind of token separators.
It's just tokens. All the way down.

The specification prescribes how the source code text is transformed into
the token sequence the compiler only cares about. It's different in
details, but conceptually it's just a transformation stage in the sense of
what the specification of the, for example, C language prescribes.

You may dislike the specification, but you can hardly argue it's not well
thought out and reasonable as a trade-off between mandatory semicolons (pre
Go 1 had them) and almost no need to write them in exchange for adjusting
to the implications and/or costs of that comfort.

If Go changed its specification such that the left brace of a statement
block must be on its own line, it'll take me probably just a few minutes to
adapt and forget about it completely, because it's such an unimportant
detail compared to what I love about Go. Why some others cannot do the same
is beyond my comprehension, but that's by definition my fault, admitted.

-- 

-j

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to