const sucks
Jesse Phillips
jessekphillips at gmail.com
Sat Oct 18 10:37:44 PDT 2008
On Sat, 18 Oct 2008 00:22:18 -0500, Andrei Alexandrescu wrote:
> Dave wrote:
>> "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.
>
> I'm very glad someone finally answered about the main thrust of the
> interview. I was a tad let down by the thundering silence following my
> post, which I attributed to its rather strident tone; in my defense, I
> have to say I was in a state of euphoria caused by such a comprehensive
> confirmation of beliefs and thinking patterns I held dear for years.
>
> That aside, I do highly recommend interested people to watch the video.
> It is slow and boring at times, but some very interesting points are
> being made, particularly about the relationship between manycores and
> immutability (fortunately, that's also towards the beginning of the
> interview). It sure makes D look like it placed a winning bet two
> (three?) years ago when we started working on immutability.
>
> To answer your point, Dave, I think the alea has been jacta with regard
> to D's flavor. We'll be unable to retire mutability as a matter of
> course, otherwise we might as well call the new language E :o). What we
> can do is to simplify introduction of places and regions where
> immutability is either a must, or the default. Also, we can better
> separate the places where mutability is harmless (stack data) from
> places where mutability causes problems (shared data). Walter is in fact
> working on language changes in that general direction.
>
>
> Andrei
I am with Bill, I didn't have much to comment on so saying, "Go D!" would
be too much like digg, "up voted for awesomeness." I say take the silence
as lack of disagreement.
With respect to "default immutable" I like the direction D is taking,
where you are able to know only a small piece of the "const" and continue
to program in a better C++. I think being able to "hide" the feature will
be good in expanding its popularity and seems that it is being done in a
way that is still easy to use.
And the mutable stack, great idea.
More information about the Digitalmars-d
mailing list