3 ms·
I think in theory you are correct: as soon as you have 2 different "versions" of a language, you can, with sufficient creativity, construct a program that will
by the_why_of_y 8y ago
I think in theory you are correct: as soon as you have 2 different "versions" of a language, you can, with sufficient creativity, construct a program that will break with the newer version.
How likely this is going to bite you in practice, though, is a different question, and one where the specifics of the language are important.
C++ is a language without a module system; instead, the preprocessor resolves #include directives by textual substitution, which is of course extremely fragile wrt. compatibility, particularly considering idiomatic "header-only libraries" of the boost variety.
Haskell doesn't use #include but has a module system, which avoids a lot of the C++ standard incompatibility issues, because you can compile each module independently with its required language standard.
Also note that there is a pragma you can put into modules to specify the version directly inline, e.g., "{-# LANGUAGE Haskell2010 #-}" or "{-# LANGUAGE Haskell98 #-}" .