On 2/26/15 3:19 PM, bearophile wrote:
Andrei Alexandrescu:

The compiler detects automatically and treats specially all classes
and interfaces that define the following two methods:<

Defining only one of those methods needs to give a compile-time error.

Well types that define empty() and front() but not popFront() are not in error, either.

This lowering assumes left-to-right evaluation of function parameters.<

Is this currently enforced in all D compilers?

No, though there have been improvements. Brian submitted an(other) issue.

This DIP allows defining reference counted class objects that are
usable in @safe code. However, it does not enforce safety.<

And do you plan to later design what's needed to enforce their safety?

Not at this time.


Andrei


Reply via email to