Want reasonable reference counting? Disable automatic sharing of immutable

Walter Bright newshound2 at digitalmars.com
Mon Nov 15 07:14:12 UTC 2021


On 11/14/2021 12:04 PM, H. S. Teoh wrote:
> Given D's emphasis on generic code, (1) seems like the only viable
> option.  Which makes const in D even narrower in scope than ever.

C++ const doesn't actually work, which is why C++ ref counted objects can be const.


More information about the Digitalmars-d mailing list