Will D ever get a reference type?
BCS
ao at pathlink.com
Fri Jul 27 13:57:28 PDT 2007
Reply to Bill,
> Will D ever get a reference type?
>
> I don't think pointers are really sufficient.
> The handy 'foo.bar' == '(*foo).bar' attribute access is nice, but it
> doesn't allow you to really manipulate values and pointers to values
> interchangeably.
> For instance, if I have an int pointer, x, I can't do (12 + x * 2)
> and
> get integer math. I get pointer math (if not an error).
> --bb
>
is the ref argument type more along the lines you are looking for?
void Foo(ref int a)
I know this is limited to arguments but other than that...
More information about the Digitalmars-d
mailing list