Pure functions in D

Bent Rasmussen IncredibleShrinkingSphere at Gmail.com
Wed Sep 24 15:09:17 PDT 2008


- for the record: public counts as sensible: in a safe world there's 
(almost) no reason to hide :-)

Bent


"Bent Rasmussen" <IncredibleShrinkingSphere at Gmail.com> skrev i meddelelsen 
news:gbedek$mvf$1 at digitalmars.com...
>> I agree that this seems where the trend goes, but:
>> - I think you can't change the language too much. D is too much based on 
>> mutable data to change it all now. So I think it may be better to invent 
>> a new language that uses mostly immutable data (Scala?) instead of 
>> turning D inside-out. I presume Walter too will invent other languages 
>> when D is finished, or even along the way.
>> - While today some languages show the advantages of immutable data, 
>> there's probably space still for a niche with a language with mostly 
>> mutable data structures. D is for that niche (today that niche is very 
>> large but it may shrink in the following years).
>
> It's not about either or. The philosphy of D, says that there is no 
> religion. Nevertheless there is still bias. The bias is whitnessed by 
> public/private-by-default, variant/const/invariant-by-default, 
> pure/impure-by-default and shared/unshared-by-default. I say: move 
> defaults towards the sensible future. This is not the same as a religious 
> outlawing of features. There is still D1 for the past.
>
> Maybe an IDE could be made to "reverse" the default so it looks like the 
> opposite.
>
>> Bye,
>> bearophile
> 



More information about the Digitalmars-d mailing list