On Thursday, 20 October 2016 at 07:40:05 UTC, Jonathan M Davis wrote:
User-defined types that manage system resources are pretty much always better off as structs so that they can have deterministic destruction.

They could be reference counted classes if it played well with the language.

In general, in D, if you don't need inheritance and polymorphism, you probably shouldn't be using a class.

Streams genuinely need polymorphism though because they can present a wide variety of devices.

Reply via email to