Pure functions in D
renoX
renosky at free.fr
Fri Sep 26 12:42:48 PDT 2008
Bent Rasmussen a écrit :
> - for the record: public counts as sensible: in a safe world there's
> (almost) no reason to hide :-)
I disagree: public isn't about being safe and private about being
hidden, it's a "making part of the interface" choice that I'll have to
support till the end of times choice.
There are quite a few maintainability guides which advise to makes small
well-defined interface, so in this mindset public shouldn't be the default.
RenoX
>
> 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