It has been 22 years between the initial public release of Perl 1.0 (December 18, 1987) and the current stable release 5.10.1 (2009).
During those 22 years the following notable releases have been made:
I'm looking for specific examples of backwards incompatibilities during the history of Perl.
Question:
Please include references and code examples when possible.
A backward compatible system is newer hardware that is backward compatible with older hardware versions of the same model. For example, PlayStation 3 (PS3) is backward compatible with PlayStation 1 (PS1) and most PlayStation 2 (PS2) systems. Hardware that is backward compatible can vary with the model and version.
In general, no. There are a lot of great new features in recent releases of Perl (smart match operator, the // operator, for two one example) that are not backwards compatible. Many authors will decide to take advantage of these features rather than keep their modules compatible with older versions of Perl.
Video games and consolesThe Atari 2600 with the Atari 5200 and 7800. The Sega Genesis with the Sega Master System via add-on component. The Nintendo Game Boy Color with the original Game Boy. The Microsoft Xbox 360 and the Xbox One can support some games released for their predecessors with emulation functionality.
Non-backward compatible changes include the following: Removing an operation. Renaming an operation. Changing the parameters of an operation, such as data type or order.
One of the biggest deliberate incompatibilities is array interpolation which changed between Perl 4 and Perl 5.
my @example = qw(1 2 3);
print "[email protected]";
In Perl 4 that would be:
[email protected]
In Perl 5 that would be:
foo1 2 3.com
Fortunately, if the array doesn't exist Perl will warn you about "possible unintended interpolation".
Threads underwent a big change between 5.005 and 5.6. "5005 threads" used the traditional POSIX threading model where all global data is shared. While in theory this was faster, because then Perl could just use POSIX threads, it was a nightmare for Perl coders. Most Perl modules were not thread-safe. And it never really worked well.
In 5.6, ActiveState and others made fork() on Windows. When you fork() on Windows, Perl would make a copy of the interpreter object and run the opcodes of both interpreters. This was known as "multiplicity".
In 5.8, Arthur Bergman ran with that and used it to create ithreads. Because multiplicity is emulating a separate process, no data is shared by default. Only data you say is shared is shared. This makes them much safer to use, though it took a long time before ithreads were stable. Folks like Elizabeth Mattijsen and Jerry Hedden made that happen.
5005threads were finally expunged in 5.10.0. A compatibility layer exists, but I doubt it would really work in production code.
Another big incompatibility came wrt Unicode between 5.6 and 5.8. Unicode in 5.6 blew. Whether or not a string was Unicode was decided by the surrounding scope. It was completely re-engineered in 5.8 so now the Unicodeiness of a string is tied to the string. Code written using 5.6's Unicode usually had to be rewritten in 5.8, often because to get 5.6's Unicode to work right you had to do ugly hacks.
Recently, 5.10.1 made a bunch of incompatible changes to smart-match. Fortunately they were introduced in 5.10.0 so its not a big deal. The story there is Perl 6 introduced the smart-match concept, and it was backported to a development version of Perl 5. Time passed, and Perl 6's idea of smart-matching changed. Nobody told the Perl 5 guys and it went out in 5.10.0 unchanged. Larry Wall noticed and did the equivalent of OMG YER DOIN IT WRONG!!! The new Perl 6 version was seen as significantly better and so 5.10.1 fixed it.
Pseudo-hashes are a recent example that spring to my mind. In general, perldelta files have an overview of incompatible changes in a specific version. These changes almost always either obscure (like pseudo-hashes) or small.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With