That would be pretty heavy-handed. The determination of what's style and what's not is a little arbitrary. For the most part, gofmt is all about where the whitespace goes (there are other things, I realize). The compiler mostly doesn't care about whitespace, as long as some whitespace is present where it needs to be, and semicolons are automatically inserted before newlines when needed. I think that's a good thing. Languages that care too much about whitespace can be pretty fragile when, for example, code is posted through e-mail or converted from one character encoding to another.
My intuition is that the compiler only cares about the semantics of the code. Gofmt cares about the presentation. On Mon, Sep 5, 2016 at 4:22 PM Anmol Sethi <an...@aubble.com> wrote: > What seperates a compile and stylistic error? As in, why not make the > non-gofmt style illegal and enforce the gofmt style by the compiler? > > -- > 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. > -- 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.