Does functional programming work?

bearophile bearophileHUGS at lycos.com
Mon Jan 4 02:20:56 PST 2010


Mike James:

>Freepascal now includes templates.<

I didn't know it. They are for classes only for now, but in future they may add for records, functions, etc, too. They are named Generics:
http://www.freepascal.org/docs-html/ref/refch8.html
It has operator overloading too:
http://www.freepascal.org/docs-html/ref/refch12.html
(And other things like built-in properties were already present).

FreePascal generics are more limited than D2 templates, but FreePascal has metaclasses and RTTI that replace some template purposes. Now FreePascal looks like a quite expressive language, you can probably use it to do most of things you can do with D :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list