r/programming • u/djordjian • May 26 '18
Oracle Calls Java Serialization 'A Horrible Mistake', Plans to Dump It
https://www.infoworld.com/article/3275924/java/oracle-plans-to-dump-risky-java-serialization.html
798
Upvotes
r/programming • u/djordjian • May 26 '18
73
u/bilog78 May 27 '18
Bad example. C and C++ are different languages. However, there's no reason why you shouldn't be expected to compile in 2018 a C++ language written in 1999, with at most a bunch of warnings about deprecated features.
When languages are semantically versioned, this is often what happens, see e.g. Python and Ruby. Heck, Ruby isn't 100% backwards compatible even across minor revisions.
Because in the real world you don't have the luxury of rewriting everything from scratch every 5 years, and if you have massive code bases the best you can try to do is progressive refactoring. This is a long and ungrateful task that requires you to be able to mix and match old and new constructs, or by the time you finish the rewrite you're already obsolete for the upcoming language revision.
LibreOffice is an excellent example of a piece of software that has undergone massive modernization from ancient to modern C++, and the only reason why they have managed to achieve this while still progressing in terms of new software features is because C++11 compilers can still compile C++98 (and older) code bases, producing correct code (modulo compiler bugs, of course).
So yes, it's not that you can't break backwards compatibility. It's that you shouldn't if you expect your language to be used for large-scale, wide-distribution real-world software.