[fpc-pascal] Re: Delphi's anonymous functions in Free Pascal
Juha Manninen
juha.manninen62 at gmail.com
Fri Oct 21 08:59:18 CEST 2011
2011/10/21 Jürgen Hestermann <juergen.hestermann at gmx.de>
> Florian Klämpfl schrieb:
>
> > If anybody does not see why increasing complexity without a good reason
> > should be avoided, I recommend:
>
> I agree wholeheartly. In the past Pascal was a simple still powerfull
> language but meanwhile it has become a catchment tank for all features of
> all other languages. This defeats the original intention of Nicholas Wirth
> and the reason for what I love(d) the language. It seems everybody tries to
> mimic Pascal into whatever he is used to do in other languages. So we should
> no longer call this (Object) Pascal but "Chimera".
>
Please look at some old Pascal code from 80's. Lots of shortstring
manipulation with pointers. Very much comparable to C, and as prone to
errors as C.
It is good to realize that Pascal would have died already without the
class/object additions made by Borland.
The challenge is to add only the RIGHT features. In school I must study
again C++ and they clearly did it wrong. Uhhh!
IMO the OP additions have been good so far. For example generics containers
eliminate ugly type-casts. It is an improvement, clearly.
Closures seem like a powerful thing which can improve code.
Now Florian mentioned that procedure variables could do the same thing. I
clearly don't understand the topic enough, I must learn more.
It is funny how fashion trends also affect the evolution of programming
languages.
When object oriented programming became a trend, everything had to be an
object.
Java libs are a good example. Some classes (nouns) have only one method
(verb) called "Execute".
Translated to human languages, it is like "man's walking executor executes"
instead of "man walks".
Now the functional languages turn fashionable, maybe as a counter-effect to
OO.
Some people said that programming became funny again when using a functional
language (Haskel was it?).
I also want to learn and understand how to say things with only functions
(verbs).
All this turbulence proves how young is the evolution of programming
languages. Human languages have a much longer evolution.
You can see they have a versatile syntax. They have lots of redundancy and
synonyms to ensure "error free message delivery".
The syntax (grammer) is not always simple but it is expressive.
Juha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111021/4da5f1e2/attachment.html>
More information about the fpc-pascal
mailing list