Does D have too many features?
bearophile
bearophileHUGS at lycos.com
Wed May 2 04:52:29 PDT 2012
Andrei Alexandrescu:
> It's a bit inappropriate to bind Walter to such a social
> contract upon having asked an informal question.
Those comments weren't required, but they improve the quality of
this community. So it's work and time well spent. Every person
attracted to work on D development is a chance to increase
significantly the development speed.
> FWIW there is little agreement among answers.
Right, but a thread like this is comparable to the first phase of
a Brainstorming process, where ideas are produced freely, where
agreement is not required.
Later there is a phase of selection, that needs to be based on
the quality of the single ideas; because technology/science
decisions can't be based (too much) on popularity.
> Eliminating today's semantics of comma inevitably underlies the
> hope that it can be retrofitted for something else, which I
> think is near impossible without changing semantics of working
> code.
Removing/restricting the usage of the comma operator is probably
able to avoid some bugs (and increase syntax uniformity in D code
written by different programmers), so it has a usefulness even if
later they are not used for tuple syntax. How much important such
bugs are, is a judgement.
> One feature to remove stands out - the struct initialization:
>
> struct S { int x, y; }
> S s = { 1, 2 };
>
> This, was noted, makes the order of members effectively part of
> the struct's interface, which is subtly dangerous. I think we
> should remove this feature.
It's a partially redundant feature, and it's able to introduce
some long-term rigidity in the code. On the other hand when you
have to write many struct literals, nested inside other literals
of different structs, repeating the names introduces a bit of
extra redundant code.
Thank you for the answers,
bye,
bearophile
More information about the Digitalmars-d
mailing list