A thought on pointers

Stewart Gordon smjg_1998 at yahoo.com
Mon Jun 26 05:26:41 PDT 2006


Tesuji wrote:
> For pointers, using * and & for dereferencing seems ugly, a more interesting
> syntax could be:
> 
> A* aPtr;
> A instanceA;
> 
> to point aPtr to instanceA, instead of
> 
> <code> aPtr = &instanceA; </code>
> 
> write
> 
> <code> aPtr -> instanceA; </code>
<snip>

If you want Fortran, you know where to find it.

Moreover, the -> notation will just confuse people coming from C(++), 
where it has a completely different meaning.

Stewart.



More information about the Digitalmars-d mailing list