[fpc-pascal] Be careful of too many features

Steve Litt slitt at troubleshooters.com
Tue May 31 04:12:13 CEST 2022


Hairy Pixels via fpc-pascal said on Tue, 31 May 2022 08:39:20 +0700

>> On May 31, 2022, at 1:59 AM, Steve Litt via fpc-pascal
>> <fpc-pascal at lists.freepascal.org> wrote:
>> 
>> The example code I've seen in the "Feature Announcement: Function
>> References and Anonymous Functions" not only doesn't look like any
>> Pascal I've ever seen, but it resembles Perl (the "one language on a
>> desert island" language before Python) in the huge number of syntax
>> choices and the "many ways to do it" philosophy.  
>
>Which part, the anonymous functions? 

I think function references and to a lesser extent anonymous functions
are necessities. Things I consider Perlization are things like
inferring context of the receiving function, "Sort( @(left, right)
begin", and other feature requests which basically are there to
reproduce other languages. And especially syntactic sugar.

> FPC is very good about keeping
>new features behind mode switches you can disable all the cruft if you
>ever want to create plain procedural Pascal like in the 80s. :)

A truly great language would be Turbo Pascal 5.5 (with OOP) plus
function/procedure references.

That being said, I'm obviously not advocating removing features already
there; I'm just saying if a feature isn't needed by Delphi/Lazarus,
think long and hard about including it.

SteveT

Steve Litt 
March 2022 featured book: Making Mental Models: Advanced Edition
http://www.troubleshooters.com/mmm


More information about the fpc-pascal mailing list