x.sizeof vs typeid(x)

Christian Kamm kamm.incasoftware at shift-at-left-and-remove-this.de
Wed Feb 6 12:39:38 PST 2008


> It may be useful for properties, but when you see something like:
> 
> foo = bar;
> 
> Is it a function call?
> I am learning to always put the () there to be explicit:
> 
> foo = bar();

It really gets odd when foo is a function as well:

void foo(int i);
int bar();

foo = bar; // same as foo(bar());

I think property syntax is nice, but should only be valid where it makes
sense (or only where the user explicitly allowed it).

Christian Kamm



More information about the Digitalmars-d mailing list