On Sat, Oct 27, 2018 at 4:52 PM, alanfo <alan.f...@gmail.com> wrote: > > As it's a package (rather than a file) level aspect, I propose adding an > optional tag to the package clause. > > If there were no tag, then the compiler would only recognize version 1 > keywords and newer ones would be treated as ordinary identifiers. > > If there were a tag such as: > > package whatever "go 2" > > then all keywords introduced up to version 2 would be recognized as such and > their use as ordinary identifiers outlawed. > > Assuming new keywords would only appear in new major versions of the > language, we could then carry on with tags of "go 3", "go 4" etc.
The problem I see with that approach is that people new to Go will read about the current language, and will try to use features from the current language, but those features will not work if they forgot to add "go 2". Adding a "go 2" tag makes sense today, but it doesn't make sense tomorrow. I'm not aware of any language that uses an approach like that. Ian -- 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.