UFCS idea

David Nadlinger see at klickverbot.at
Wed Jun 8 17:13:56 PDT 2011


On 6/9/11 2:10 AM, Timon Gehr wrote:
> Also, don't we have non-nullable references in the language already?:
>
> int foo(ref int x){ // non nullable int reference!

Nope, what's commonly meant by »non-nullable references« is, having some 
reference type, the ability to declare some variable of that type that 
can never be null, i.e.:

---
class Foo {}

void main() {
   Foo@ foo; // An error, because foo would be null.
}
---

David


More information about the Digitalmars-d mailing list