www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Pure functions in D

reply Josh Szepietowski <Goosey gmail.com> writes:
Walter Bright Wrote:

 Knud Soerensen wrote:
 When are pure functions coming to dmd ?

They're about half-implemented. Given the unexpected huge interest in this, I'll have to bump up the priority!

Fantastic news! I must reveal that pure functions are the "killer feature" in D2.0 for me, personally.
Sep 22 2008
parent reply Mosfet <mosfet anonymous.org> writes:
Josh Szepietowski wrote:
 Walter Bright Wrote:
 
 Knud Soerensen wrote:
 When are pure functions coming to dmd ?

this, I'll have to bump up the priority!

Fantastic news! I must reveal that pure functions are the "killer feature" in D2.0 for me, personally.

Don't really understand why this feature is so important while there are so many things to achieve.
Sep 23 2008
parent reply Ary Borenszweig <ary esperanto.org.ar> writes:
Mosfet wrote:
 Josh Szepietowski wrote:
 Walter Bright Wrote:

 Knud Soerensen wrote:
 When are pure functions coming to dmd ?

this, I'll have to bump up the priority!

Fantastic news! I must reveal that pure functions are the "killer feature" in D2.0 for me, personally.

Don't really understand why this feature is so important while there are so many things to achieve.

True. They won't boost your productivity. They won't free you from bugs. They will just enhance your application's performance.
Sep 23 2008
next sibling parent Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
Ary Borenszweig wrote:
 Mosfet wrote:
 Josh Szepietowski wrote:
 Walter Bright Wrote:

 Knud Soerensen wrote:
 When are pure functions coming to dmd ?

in this, I'll have to bump up the priority!

Fantastic news! I must reveal that pure functions are the "killer feature" in D2.0 for me, personally.

Don't really understand why this feature is so important while there are so many things to achieve.

True. They won't boost your productivity. They won't free you from bugs. They will just enhance your application's performance.

And even on the performance front I'm a bit skeptical on how well it can be used in practice. So I do agree that this is really not one of the most important features of D, and even if it's very important for concurrency, to succeed D still needs to get the basics of a language done right, and there is still much other work to be done here. But there is one advantage in having pure and other extensive reforming features implemented as soon as possible, which is to prevent future major breaking changes in the language... We've all seen the rift D2's const has created, so the more overhauls that get done ASAP, the better. But we must settle down sometimes, and never forget the other important pending issues D has. -- Bruno Medeiros - Software Developer, MSc. in CS/E graduate http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Sep 23 2008
prev sibling parent Walter Bright <newshound1 digitalmars.com> writes:
Ary Borenszweig wrote:
 True. They won't boost your productivity. They won't free you from bugs. 

I disagree. Pure functions increase productivity and reduce the scope of bugs by providing statically enforcible constraints on what a function can do. This reduces the cognitive load on the programmer.
Sep 26 2008