Live data from Hacker News

Go Lang: Comments Are Not Directives

news.ycombinator.com

221–222 of 222 posts

Re: Go Lang: Comments Are Not Directives

#221
post #8

Want to know what's even worse? Using comments for something but not parsing the syntax tree . In go 1.4, save the following to a file and run 'go generate' on it: https://play.golang.org/p/9WJtxClRXr (I'd make it run in the playground, but you can't 'fork exec', so exec.Command($GOBIN, generate) won't work sadly) Even though that code has no comments (only a multi-line string), go generate will run and print out a '…

"Go often prefers pain for the programmer for the compiler developer's life being simpler by about 5 minutes." Interesting contrast to the philosophy of Perl 6: 'torture the implementor on behalf of the user'.

This is exactly the "Worse is Better" debate. We know which horse won last time, I would bet on the same one this time too.
Post reply on HN