new DIP5: Properties 2

language_fan foo at bar.com.invalid
Tue Jul 28 04:52:46 PDT 2009


Tue, 28 Jul 2009 04:57:57 -0400, Kagamin thusly wrote:

> Andrei Alexandrescu Wrote:
> 
>> > I know you said you didn't
>> > really like the idea of having to name your range's empty function
>> > 'opGet_empty'.
>> 
>> Correct. I'd rather try to disambiguate the rather rare case when a
>> property returns a delegate etc. For me, I get a breath of fresh air
>> whenever I get to not write "()". I can't figure how some are missing
>> it.
> 
> It's agains C look and feel to call function without braces. It's not a
> problem to write code. It's a problem to read and understand it, isn't
> it? Isn't current programming techniques development aimed to ease
> maintenance?

Yes, the C syntax has been scientifically proven to be the optimal for 
humans to read. All the extra braces and semicolons are there to guide 
your eye movement. I simply don't get why anyone would use a language 
without those. In fact I see one problem in D when compared to C++:

C++: class Foo {}; vs

D: class Foo {}

The missing semicolon makes me vomit. I wish the syntax will be fixed 
some day. It would probably also ease the maintenance in case of 
syntactic errors.



More information about the Digitalmars-d mailing list