News for hackers. Stuff that matters.
Re:Jsfmt – Like Gofmt, but for JavaScript by stusmall on Friday May 09, 2014 @11:02PM (#7724318)
What I was referring to is curly brace placement.

func main() { }

vs

func main() { }

which produces the error "prog.go:4: syntax error: unexpected semicolon or newline before {". As I understand it this is because of the rules of where it will insert semicolons. It isn't enforcing everything about the format which is why I said "to a degree" but it is still one of the most opinionated compilers on format that I know of.

Either way, I'm glad they did it. The "where should the curly brace go" is one of the most annoying bike-sheds.

Re:Jsfmt – Like Gofmt, but for JavaScript by achal on Saturday May 10, 2014 @01:21AM (#7724599)
In case anyone else thinks they're insane, the two are the same. The second one should have been

    func main()
    {
    }
Re:Jsfmt – Like Gofmt, but for JavaScript by stusmall on Saturday May 10, 2014 @09:38AM (#7725341)
Oh thanks! Not sure how it got trashed.