Pure functions in D

bearophile bearophileHUGS at lycos.com
Mon Sep 22 08:27:05 PDT 2008


bearophile:
> - Good closures
> - A very compact syntax for delegates/closures. In Haskell and other FP languages you can see how you can even turn operators into functions in a very short space.
- etc...

In that list I have missed a quite important thing: the compiler has to know those syntax constructs and needs to know ways to simplify them, so they become compiled efficiently, otherwise the programmer of a system language will not be encouraged to use them in some parts of the code. The Haskell compiler has several ways to simplify and compile the code in an efficient way. Other compilers like Scheme Stalin show that there are lot of things that can be done to produce efficient assembly from FP-style code.

Bye,
bearophile



More information about the Digitalmars-d mailing list