Sealed classes - would you want them in D? (v2)
KingJoffrey
KingJoffrey at KingJoffrey.com
Sun May 20 02:21:53 UTC 2018
On Saturday, 19 May 2018 at 17:15:45 UTC, Neia Neutuladh wrote:
> On Saturday, 19 May 2018 at 09:49:39 UTC, KingJoffrey wrote:
>> On Saturday, 19 May 2018 at 09:37:56 UTC, Uknown wrote:
>>>
>>> The point was encapsulation as you defined it was broken.
>>> private members were directly modified outside their class.
>>> In your words, everyone was a friend.
>>
>> This is why we have coding standards ;-)
>>
>> https://www.nccgroup.trust/globalassets/our-research/us/whitepapers/2017/april/accessing-private-fields-outside-of-classes-in-java.pdf
>
> Coding standards are good enough for Java but not for D?
Coding standards are required for any quality development.
How many in the D community have, let alone follow, coding
standards when coding in D?
The problem with D, is that everything is essentially unsafe, by
default.
To get safety, you have to implement a variety of coding
standards, that are simply not required as much in other
mainstream langauges. The worst for me, is that you have to
implement 'a one class per module coding standard' (because
otherwise your privates just suddenly morph into public), just to
ensure the safety of your interface from human error. That's
crazy!
In any case...development is moving towards safer langauges, and
towards safer by default.
D has a lot to catch up with, cause other langauges are decades
ahead here.
That's why I see D has this little boutique langauges, for
programmers that just want to get away with doing whatever - by
default.
More information about the Digitalmars-d
mailing list