new DIP5: Properties 2
Dimitar Kolev
DimitarRosenovKolev at hotmail.com
Tue Jul 28 13:49:14 PDT 2009
language_fan Wrote:
> 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.
The missing semicolon makes you vomit? Come on that is an exaggeration.
I had problems in C++ with that stupid semicolon that was there for no apparent reason but to be forgotten by the programmers and to cause a bunch of non-understandable mistakes to be generated by the stupid debuggers.
{} - should be a end point of its own without requiring people to tell it that there is nothing beyond it.
It is like saying that you should put ";" after function definition.
What errors will the missing ";" cause?
As I said {} should be an end of its own.
More information about the Digitalmars-d
mailing list