A few questions

bearophile bearophileHUGS at lycos.com
Fri Jul 27 07:35:02 PDT 2012


Simen Kjaeraas:

> I believe at least part of the explanation is that Walter wants 
> NotNull to
> implemented in a library. That's part of the reason for 
> introducing @disable this().

Yes, I remember part of the discussions. And I agree that 
generally it's better to put meta-features in a language that 
allow library code to implement the desired features.

That's why recently in the main D newsgroup I have said that 
built-in vector ops may be better replaced by library code 
(what's missing is some built-in trick to avoid the creation of 
intermediate arrays in complex expression).

But implementing good non-null types in library code is hard 
(rather harder than implementing vector ops in library code on 
library defined vectors). I think @disable isn't enough to cover 
what Spec# shows good non-null types are meant to be.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list