Escaping the Tyranny of the GC: std.rcstring, first blood
Piotrek via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 17 14:12:08 PDT 2014
On Wednesday, 17 September 2014 at 16:32:41 UTC, Andrei
Alexandrescu wrote:
> On 9/17/14, 9:30 AM, Dicebot wrote:
>> Ironically, strings have been probably least of my GC-related
>> issues
>> with D so far - hard to evaluate applicability of this
>> proposal because
>> of that. What are typical use cases for such solution? (not
>> questioning
>> its importance, just being curious)
>
> Simplest is "I want to use D without a GC and suddenly the
> string support has fallen down to bear claws and silex stones."
>
> RCString should be a transparent (or at least near-transparent)
> replacement for string in GC-less environments.
>
>
> Andrei
I think the biggest gc=(partially?)off customers are game makers:
http://forum.dlang.org/thread/k27bh7$t7f$1@digitalmars.com
(check especially the bottom of the 6th page)
Random quote:
"I created a reference counted array which is as close to the
native D
array as currently possible (compiler bugs, type system issues,
etc).
also in core.refcounted. It however does not replace the default
string
or array type in all cases because it would lead to reference
counting
in uneccessary places. The focus is to get only reference couting
where
absolutly neccessary. I'm still using the standard string type as
a
"only valid for current scope" kind of string."
And my fav:
"- You most likely won't like the way I implemented reference
counting"
I hope Benjamin Thaut can share his viewpoint on the topic if he
is still around.
Piotrek
More information about the Digitalmars-d
mailing list