News for hackers. Stuff that matters.
Re:Backward Compatibility, Go 1.21, and Go 2 by izacus on Monday August 14, 2023 @01:30PM (#37123870)
Can you explain in what way is that different from e.g. C++, where a compiler will take "-std=<C++ revision>" parameter which chooses the "edition" of the language?

And even link different versions together?

Because it sounds like Rust uses the same approach with the benefit of not hitting all the problems this causes... yet.

Re:Backward Compatibility, Go 1.21, and Go 2 by kaba0 on Monday August 14, 2023 @03:26PM (#37125641)
I would also be interested in it. As far as I know editions only allow for syntax changes, the semantics will change if incompatible, especially that Rust doesn't link across different versions in the same way as C++ does.
Re:Backward Compatibility, Go 1.21, and Go 2 by uluyol on Tuesday August 15, 2023 @12:59AM (#37130368)
C++ unfortunately does textual inclusion for header files. So "-std=" does not automatically work for those. You need to sprinkle in #ifdefs rather than getting automatic forward compatibility.