Adding a new design constraint to D
Walter Bright
newshound2 at digitalmars.com
Sat Jun 18 05:50:56 UTC 2022
On 6/17/2022 10:14 PM, Max Samukha wrote:
> On Friday, 17 June 2022 at 21:40:58 UTC, Walter Bright wrote:
>> Not the least of which is there is no such thing as a correct language design.
>> There are only tradeoffs.
>
> There is an inconsistent language design. If the main paradigm the language is
> built around is class-based OOP, then it is reasonable to expect that 'private'
> is class-private (or at least there is a way to express class-private).
Consistency is a worthy goal, but as I explained in my recent Code Europe
presentation, too much consistency leads to undesirable results, too.
For example:
for (int i = 0; i; ++i);
{
...
}
D adds grammatical inconsistency to reject that.
And then there's that famously inconsistent symbol table lookup that D does that
everyone but me insisted is intuitive :-)
More information about the Digitalmars-d
mailing list