[fpc-pascal] Multi-scope helpers draft
ryan at thealchemistguild.com
Sat Nov 24 05:20:05 CET 2018
I’d like to propose this mode switch ($modeswitch multiscopehelpers) to allow multiple helpers per scope. I have no idea why Delphi thinks only one helper should be allowed in any scope but it cripples the feature severely. Sharing helpers is mostly not possible because of potential conflicts and even relying on helpers in your own code base is not safe because conflicts could occur later. Helpers are basically just a way to extend procedural calls to dot notation so I don’t understand why this restriction was ever out in place (Objective-C and C# never imposed the restriction on their categories/extensions).
All of the hard work was already done so it was just a matter of lifting the artificial restriction that was placed on them. There’s still clean up to do and as always I may have misunderstood something fundamental about the compiler design.
More information about the fpc-pascal