const sucks

Dave Dave_member at pathlink.com
Fri Oct 17 22:02:21 PDT 2008


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:gd85n2$9rq$1 at digitalmars.com...
> Just got this from Eric Niebler:
>
> http://tinyurl.com/4apat7
>
> Guess what Anders Heljsberg and Guy Steele have to say about future of
> programming languages.
>
> Immutable and eliminating side effects are necessary. Quickly written down
> from Anders: "...we need support for immutable data at the language
> level..." "...so that the compiler can infer that there is isolation..."
> "... formalization of immutability... we don't have them in the language
> and it's nontrivial to put them in... and that's the big challenge." He
> goes on and describes the difficulties... and mentions "pure functions"
> and "transitivity" and "functional extensions"!!! "Pure FP is not the
> solution... what we try to do is to have islands of purity in functional
> style and switch between default to functional in a hybrid style of
> programming... the answer is not at the extreme..."
>
> This is huge. You have to listen to it to hear just how huge it is. He is
> essentially describing some of the difficulties we have encountered and
> already solved in D2, so it looks we have a strategic advantage.
>
> This is the confirmation I hoped was going to come someday. If it
> surprises me, it that it comes so early, so unequivocally, and so aligned
> terminologically. I'm in Nirvana.
>

Anders mentioned "... be clearer about where the mutation occurs and where 
the side-effects are, by in a sense switching the default to be more 
functional".

Should D3 be the version that introduces default immutable storage and 
default pure functions?

IIRC, this was discussed for D2 early on in the const discussion, but the 
consensus then was that it was too big of a leap for an imperative language.




More information about the Digitalmars-d mailing list