Hacker News new | past | comments | ask | show | jobs | submit
//go:xyz is dedicated syntax that is compatible with both the language spec and other toolchains that don't know about it.
It's an overloaded comment. I am personally quite fine with it, I don't think it's bad. but it is an overloaded comment.
I'm no longer sure what you're saying. You asked why they didn't go with dedicated syntax, I listed two advantageous aspects of the chosen syntax. We know it's an overloaded comment: that's literally one of the advantages.
Well, I've been unable to follow you as well, then. Obviously if they'd used a different type of syntax (e.g. using # for annotations), those would also be compatible with the language spec, and other implementations would still be just as capable of ignoring all unknown annotations.

(Though for the record, talking about alternative implementations when discussing Go is kind of a funny joke.)

Is gccgo a joke to you?
loading story #47396330
{"deleted":true,"id":47395296,"parent":47392491,"time":1773636160,"type":"comment"}
Good luck compiling on a toolchain that doesn't know about //go:embed or /* */import "C" comments.