Ramifications of const
Georg Wrede
georg at nospam.org
Wed Jun 13 12:42:58 PDT 2007
Jari-Matti Mäkelä wrote:
> I don't believe D is going to be purely functional anywhere in the near
> future. There was only talk about constness of e.g. function parameters and
> certain variables.
The day D gets purely functional, I'm outta here!
But, several aspects that relate to recognizing functions as purely
functional or not, do give us both immediate benefits as well as open up
avenues for significant gains in the future.
A language that handles (and understands) smoothly both functional and
non-functional code, is in a position to reap the benefits from both
worlds. This is no more peculiar than the fact that D is an excellent
language for both OO and non-OO programming, as well as mixed OO/non-OO
programming.
We are already using pure functions (like sin(x), abs(x), etc.) in our
code, and this does not have to become any more complicated than that.
But for the compiler, optimizer, parallel code generator, and some other
future things, knowing which functions are Pure, is simply essential.
More information about the Digitalmars-d
mailing list