4 ms·
I've considered using D several times instead of Free Pascal because D has much stronger metaprogramming functionality that in some of my projects i really want
by badsectoracula 3y ago
I've considered using D several times instead of Free Pascal because D has much stronger metaprogramming functionality that in some of my projects i really wanted, but this stance towards backwards compatibility is basically one of the two main reasons i didn't (the other being that Free Pascal has a great IDE and framework in Lazarus/LCL whereas the D community never seemed to get behind a single one to polish it - and amusing the only one in the wiki that doesn't look dead is actually written in Free Pascal and Lazarus).
FPC "solves" the backwards compatibility issue by simply not breaking existing code and any potential conflicting functionality is enabled with compiler directives - this way you can still use code you wrote more than a decade ago without any modifications while at the same time you can use brand new functionality introduced to the language on a per-source level (which also allows you to bring a larger codebase up to speed piece by piece instead of forcing you to upgrade everything in one huge step).
This is IMO the best approach for evolving a language without breaking existing code. Does it make the first few lines of a source file look weird with all the directives that enable functionality? Sure it does, but this is way more preferable than having code that you spent time on break. IMO that is a complete disregard for the time your users have invested learning and working with your language. We are not immortal after all.