[NOTE: an unofficial answer on Rob Pike's behalf] ...no, not organic growth, not oversight, not antique JCL inflexibility, rather, a design choice. Use of the "//tag:stuff" structure comes as a benefit vs cost optimization:
The benefit is that it hides within the existing comment structure and adds nothing to the language. The cost is that there is always the risk of making old "code" incompatible by interpreting as a directive what was just a comment, "// go tell it on the mountain." The design demands that the tag immediately follow the line comment indicator, and that the pair be placed at the start of a line. When it was introduced, it broke nothing, which is nice and no doubt the intention. On Sat, Apr 29, 2017 at 7:49 AM, <mhhc...@gmail.com> wrote: > So the question is, > if it was intentionally made like this, > was it made to make sure a s/beginner/anyone/ will fail at least once ? > > But i m sure it is just organic growth. > > On Saturday, April 29, 2017 at 4:25:16 PM UTC+2, Konstantin Khomoutov > wrote: >> >> On Sat, 29 Apr 2017 04:33:19 -0700 (PDT) >> mhh...@gmail.com wrote: >> >> > just a note about the //go:gen comment. >> > >> > If there is a space in front of go:gen, it won t work, this, >> > // go:gen... >> [...] >> >> Let's cite the output of running `go help generate`: >> >> | Go generate scans the file for directives, which are lines of >> | the form, >> | >> | //go:generate command argument... >> | >> | (note: no leading spaces and no space in "//go") where command >> | is the generator to be run, corresponding to an executable file >> | that can be run locally. It must either be in the shell path >> | (gofmt), a fully qualified path (/usr/you/bin/mytool), or a >> | command alias, described below. >> > -- > 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. > -- Michael T. Jones michael.jo...@gmail.com -- 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.