D's greatest mistakes
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Fri Dec 10 10:41:27 PST 2010
On 30/11/2010 20:47, Andrei Alexandrescu wrote:
>
> Same discussion goes about non-nullable. We don't need the compiler to
> understand non-nullable types, we need to imbue the compiler with the
> ability to enforce arbitrary user-defined state invariants, non-null
> being one of them.
>
That would be great. That would be *really* great. There are lots of
useful invariants one might want to express. (something like Java's
wildcards for containers, or numeric ranges, maybe ownership
relationships, etc.)
However, just as it would be very useful, wouldn't it be an incredibly
compex feature set to implement, at least in a sufficiently generic and
useful way? Complex enough for it to be something that could not be
worked in anytime soon?
Because the impression I get from Steven and others, is that this issue
is quite critical, and makes writing D code unpleasant in many
situations (I myself can't agree or disagree, haven't used D2 enough in
pratice, but their arguments and experience seem convincing)
--
Bruno Medeiros - Software Engineer
More information about the Digitalmars-d
mailing list