|
|
Subscribe / Log in / New account

What happened to Perl 7?

What happened to Perl 7?

Posted May 27, 2022 0:13 UTC (Fri) by NYKevin (subscriber, #129325)
In reply to: What happened to Perl 7? by tialaramex
Parent article: What happened to Perl 7?

This is great, right up until you need to change the runtime semantics of something, a la Python 3 and Unicode.

At which point, I suppose, the answer is "Just don't do that then." Instead, you introduce a new object that exists at runtime, and the parsing logic creates either an instance of the new object or an instance of the old object depending on which feature flag is lexically in-scope for that particular declaration. Then new code gets new semantics, and old code gets old semantics. Problems:

* If the object is first-class, then old code will expect instances of the old type, and new code will expect instances of the new type, so you probably have to expose this difference in the type system.
* If the object instances can interact with each other, now you have to figure out the semantics of this interaction for each possible combination of versions.
* If the language supports generics and the object is first-class, can a generic class from the old version match (be instantiated with) the type of the new version?
* If the language is dynamically typed, good luck getting any of this right.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds