x.sizeof vs typeid(x)

Robert Fraser fraserofthenight at gmail.com
Wed Feb 6 12:18:56 PST 2008


bearophile wrote:
> Sergey Gromov:
>> Less typing is often => less maintainable.
> 
> But that may be false if you take lot of care of keeping the language tidy, quite ergonomic. Python is quite maintainable, and it's far from being verbose. Haskell too is readable enough, if you know it, despite its programs being quite short.
> 
> In this regard, one of the things I don't like of D syntax is that it allows to call functions without the final () if they take no arguments. 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();
> 
> To improve code readability I think it may be better to remove this feature from the language (and later that may be used to simplify the object instantiation syntax).
> 
> Bye,
> bearophile

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.



More information about the Digitalmars-d mailing list