UFCS idea
Timon Gehr
timon.gehr at gmx.ch
Wed Jun 8 17:32:13 PDT 2011
David Nadlinger wrote:
> 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
I understand that. I just think it would be a bit messy to have both @ references
and ref for call by reference.
Timon
More information about the Digitalmars-d
mailing list