The purpose would be to fail fast when a module uses features that aren't supported. Because this could affect parsing, it should be done for the module as a whole and not on a per-file basis. If it's in the .zeolite-module, it should be at the very top and should cause parsing to terminate if there's a version mismatch.
Upper bounds probably aren't necessary; we don't need to go embedding a dependency-versioning system in the compiler.
Ideally, the features will level out soon and this won't be necessary, or just a min version will be supported.
A potential problem with this whole idea is that with compiler 0.n+1 installed, the user might not even be able to compile modules for 0.n due to possible breaking changes. So, it's almost a requirement that backward compatibility be maintained. Or, it's a requirement that old things be brought up to date.
Thus, the version would only be for language or module-system features that didn't exist prior to a specified version.
If done poorly, this could be a mess.
The purpose would be to fail fast when a module uses features that aren't supported. Because this could affect parsing, it should be done for the module as a whole and not on a per-file basis. If it's in the
.zeolite-module
, it should be at the very top and should cause parsing to terminate if there's a version mismatch.Upper bounds probably aren't necessary; we don't need to go embedding a dependency-versioning system in the compiler.
Ideally, the features will level out soon and this won't be necessary, or just a min version will be supported.
A potential problem with this whole idea is that with compiler
0.n+1
installed, the user might not even be able to compile modules for0.n
due to possible breaking changes. So, it's almost a requirement that backward compatibility be maintained. Or, it's a requirement that old things be brought up to date.Thus, the version would only be for language or module-system features that didn't exist prior to a specified version.