Sealed classes - would you want them in D?

rikki cattermole rikki at cattermole.co.nz
Fri May 11 08:08:20 UTC 2018


On 11/05/2018 8:00 PM, Tony wrote:
> On Friday, 11 May 2018 at 03:32:25 UTC, Uknown wrote:
>> Also, classes are pretty inconvenient because they are hard to use 
>> without the GC.
>>
> I find it surprising that a language that had Garbage Collection as one 
> of its' key features, now has that feature looked at as an 
> inconvenience. Was it a design error, or did the wrong class of users 
> latch onto the language?

GC is the right memory management strategy for a lot of use cases.
But there is many more where it isn't the right one.

D however is naturally more useful and hence successful in the second 
set of cases (see Weka.IO and Sociomantic as examples).

And no, you can use classes without the GC pretty easily. Its just that 
structs are even easier still and we do love counting cpu cycles.


More information about the Digitalmars-d mailing list