Hi all, In 1984 I started my programming career with Whitesmith Pascal, and soon after Turbo Pascal 3, then C. C had the advantage of pointers to functions, Pascal had the advantages of better readability and less likelihood of errant pointers and buffer overruns. I did a little work with Object Oriented Turbo 5.5.
I'm totally pleased that FPC now has function references making callback routines possible. Closures are also nice. And I suppose under certain conditions anonymous functions are an asset, although my experience with Lua tells me it's easier and more readable to name a function temp243() and use it, rather than having a anonymous function sitting there in the middle of other code. 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. I programmed professionally in Perl for 4 years, until I ran across a shopping cart application written in a Perl so bizarre that I didn't recognize it as the language I'd used for four years. The "many ways to do it" philosophy had guaranteed that anyone good enough to do maintenance programming in Perl would have to learn not only the language, but every single little shortcut and longcut possible. I switched to Python. So did everyone else. Perl 6 never really made it because most people don't want a "many ways to do it" language, they want a simple language that can do anything. So people chose Python, and to a lesser extent Ruby and Lua, and Perl withered on the vine. With the addition of callback functions, and the closures and events they bring to the table, you can go procedural, OOP, or to a degree functional. I think adding yet more features obfuscates and Perlizes Pascal. SteveT Steve Litt March 2022 featured book: Making Mental Models: Advanced Edition http://www.troubleshooters.com/mmm _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal