4 ms·
Edit: I had some wrong assumptions here. The Go approach does indeed seem to enable similar functionality. Although I'm not quite sure I understand how the ind
by the_duke 3y ago
Edit: I had some wrong assumptions here.
The Go approach does indeed seem to enable similar functionality. Although I'm not quite sure I understand how the individual settings and the module level version declarations compose, and how much complexity that introduces.
With both module-level versions and GODEBUG, the whole thing does seem quite a bit more complicated than editions.
- vocx2tx 3y ago> The setting is opt-out, requiring manual intervention. No. If a module's go.mod files declares go1.21, the compiler will use go1.21 semantics when building it, even if 1.22 has already been published and the module is being used from a 1.22-enabled program. This is explicitly mentioned in the blog post.
- tick_tock_tick 3y agoIt's basically a much more featured, flexible, extendable, and usable version of editions. Anything you could do with editions you could do with this; you could implemented "editions" via this functionality.
- the_duke 3y agoYes, but that's sort of my point regarding complexity. "This crate is edition X, and an edition comes out every 3 years or so" is much easier to deal with. It reminds me a bit of Haskell language pragrams, which can be toggled per source file (module), and which are a huge mess.