x.sizeof vs typeid(x)
torhu
no at spam.invalid
Wed Feb 6 15:32:56 PST 2008
Robert Fraser wrote:
> Matti Niemenmaa wrote:
>> Robert Fraser wrote:
>>> I agree with you on that particular syntax. I think when it's a member
>>> of some sort, that syntax should be allowed, though (to allow a
>>> property syntax), but for free functions it's a bad idea.
>>
>> The argument for class properties applies equally well to global variables.
>>
>
> Oops, forgot about those... alright, well I guess then people just need
> to be careful with this syntax.
I've actually used that when making bindings for a C library which has
got some volatile globals. Just property wrappers with volatile
statements in them. At least it made the examples easier to port.
Whether this syntax is good or bad in general, I'm not sure.
More information about the Digitalmars-d
mailing list