Sealed classes - would you want them in D?

rumbu rumbu at rumbu.ro
Wed May 16 21:13:36 UTC 2018


On Wednesday, 16 May 2018 at 16:43:31 UTC, Walter Bright wrote:
> On 5/16/2018 6:55 AM, Andrei Alexandrescu wrote:
>> On 05/16/2018 04:42 AM, Dave Jones wrote:
>>> On Wednesday, 16 May 2018 at 08:20:23 UTC, Uknown wrote:
>>>> On Wednesday, 16 May 2018 at 07:53:36 UTC, aliak wrote:
>>>>
>>>> Just checked the rust spec [0]. private in rust => 
>>>> accessible from that module and its descendants, which is 
>>>> what package in D is. private in D would be to that module 
>>>> only.
>>>>
>>>> [0]: 
>>>> https://doc.rust-lang.org/beta/reference/visibility-and-privacy.html
>>>
>>> Dont know if its been mentioned before but in Delphi / Object 
>>> Pascal private is accessible to everything in the same 
>>> module. Same as D.
>> 
>> This is interesting, thanks for the info.
>
> I had no idea. It's either parallel gestation of a great idea, 
> or they took it from D!

Pascal has the same visibility attributes with the same semantics 
since Turbo Pascal 5.5 (1989). The only addition was 'published' 
attribute in 1995, somehow equivalent to 'export' in D.

And a vintage nostalgic ad :)
http://edn.embarcadero.com/article/images/20803/tp55ad.jpg


More information about the Digitalmars-d mailing list