Which D features to emphasize for academic review article

simendsjo simendsjo at gmail.com
Sun Aug 12 03:42:29 PDT 2012


On Sun, 12 Aug 2012 12:38:47 +0200, Walter Bright  
<newshound2 at digitalmars.com> wrote:
> On 8/11/2012 7:30 AM, Jakob Ovrum wrote:
>> On Saturday, 11 August 2012 at 09:40:39 UTC, Walter Bright wrote:
>> Consider `pure` member functions - turns out most of them are actually  
>> pure
>> because the implicit `this` parameter is allowed to be mutated and it's  
>> rare for
>> a member function to mutate global state, yet we all strive to correctly
>> decorate our methods `pure` when applicable.
>
> A better design would be to have pure be the default and impure would  
> require annotation. The same for const/immutable. Unfortunately, it's  
> too late for that now. My fault.
>

I have thought that many times. The same with default non-null class  
references. I keep adding assert(someClass) everywhere.


More information about the Digitalmars-d mailing list