As far as I understand, it is not a minimum version of the language. 

 Also, a key point that is easy to miss is that the language version is 
distinct from tooling version, and newer tooling versions will know how to 
compile older language versions. At least, that is my understanding, though I 
am also aware there is some confusion on the topic, so I don’t fully trust my 
understanding. 

Some related text from the document Ian cited:

———————
The Go compiler released with Go version 1.20 must be able to build packages 
using Go language 1.19. This can be done by adding an option to cmd/compile 
[...]. When cmd/compile sees the option, perhaps -lang=go1.19, it will compile 
the code using the Go 1.19 syntax.

Importantly, specifying the maximum version of the Go language should not be 
taken to imply the maximum version of the Go tools.

[...]

When cmd/compile sees the option, perhaps -lang=go1.19, it will compile the 
code using the Go 1.19 syntax.
This requires cmd/compile to support all previous versions, one way or another.

[...]

Naturally, even though the package is built with the language version 1.19 
syntax, it must in other respects be a 1.20 package: it must link with 1.20 
code, be able to call and be called by 1.20 code, and so forth.

The go tool will need to know the maximum language version so that it knows how 
to invoke cmd/compile. Assuming we continue with the modules experiment, the 
logical place for this information is the go.mod file. The go.mod file for a 
module M can specify the maximum language version for the packages that it 
defines
——————

Regards,
thepudds

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/810a1cb4-c3fb-4b2f-bc86-02793902d422%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to