x.sizeof vs typeid(x)

Janice Caron caron800 at googlemail.com
Tue Feb 5 23:12:11 PST 2008


I believe there are plans afoot to remove the distinction, so that
f(x) and x.f are, in general, interchangable. If and when that day
comes, perhaps we'll be able to write sizeof(x) and x.typeid as well?

On 06/02/2008, Sergey Gromov <snake.scaly at gmail.com> wrote:
> I wonder why .sizeof is implemented as a property while typeof() and
> typeid() are functions.  I can see no reasons for such inconsistency.
> It's not that obvious for typeof() because it yields a type instead
> of a value, but even then, why not ?
>



More information about the Digitalmars-d mailing list