Hacker News new | ask | show | jobs
by rakoo 3725 days ago
Go has many "special comments" that actually do stuff:

* build tags (https://golang.org/pkg/go/build/)

* code generation (https://blog.golang.org/generate)

This is the exact point where you start to see that the Go creators are ok with hackery as long as it works and doesn't make the overall design too complicated.

1 comments

It looks like we agree Go has "special comments", not "executable comments".

I recognise that Go' special comments can be seen as a hack, but honestly they are not so different from Rust's attributes or Haskell's pragmas, which can look clunky too.

No way. Comments are comments, attributes are attributes. Previous discussion: https://news.ycombinator.com/item?id=9522973
Bingo.