Adding a new design constraint to D
Max Samukha
maxsamukha at gmail.com
Sat Jun 18 09:42:40 UTC 2022
On Saturday, 18 June 2022 at 05:50:56 UTC, Walter Bright wrote:
> 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.
Yes, that's a good one. I still believe it wasn't worth the
special case. Such special cases tend to cause other issues,
which are often disregarded (like highly annoying hindrances to
generic programming).
>
> And then there's that famously inconsistent symbol table lookup
> that D does that everyone but me insisted is intuitive :-)
You might have based your decisions on the feedback by the
vociferous few while there is the silent majority whose opinion
is unknown. I've been familiar with D since around 2006 and never
voiced my opinion about the module-level private until now.
More information about the Digitalmars-d
mailing list