Future of SafeRefCounted

Sebastiaan Koppe mail at skoppe.eu
Tue Feb 25 11:00:47 UTC 2025


On Tuesday, 25 February 2025 at 00:17:19 UTC, Jonathan M Davis 
wrote:
> On Saturday, February 22, 2025 12:05:49 PM MST Dukc via 
> Digitalmars-d wrote:
>> What are your thoughts?
>
> Personally, I'm very much hoping that DIP 1000 gets killed off. 
> There are some niche cases where it's useful [...]

I use dip1000 in two ways, firstly to avoid allocations on the 
heap and secondly to safely share references to objects with 
limited lifetime. Often both at the same time.

Avoiding allocations (GC or malloc) allows the program to run 
faster with fewer resources. I personally value efficient and 
safe programs, and IMO it should be a core focus of the language.

I do see challenges with dip1000's usage, but relegating it by 
saying its only useful for niche cases neglects a whole set of 
efficient programs. I understand not everyone cares about them to 
the same extent, but don't forget there is a chicken-and-egg 
problem as well: if it's relatively hard to write efficient 
programs, you'll tend to filter out the people who care about 
them.

> Either way, as things stand, DIP 1000 is not going to be a 
> solution for making anything in Phobos v3 @safe.

That is a real shame. That leaves implementing them either 
@system, inefficiently or not at all.


More information about the Digitalmars-d mailing list