The "no gc" crowd

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 8 21:25:12 PDT 2013


On 10/8/13 9:24 PM, Jonathan M Davis wrote:
> On Tuesday, October 08, 2013 20:46:16 Andrei Alexandrescu wrote:
>> On 10/8/13 8:31 PM, Walter Bright wrote:
>>> On 10/8/2013 8:18 PM, deadalnix wrote:
>>>> We also badly need to be able to use type qualifier. We must
>>>> stop the world when collecting thread local data or immutable one.
>>>> That do not
>>>> make any sense.
>>>
>>> Making this work is fraught with difficulty. It is normal behavior in D
>>> to create local data with new(), build a data structure, and then cast
>>> it to shared so it can be transferred to another thread.
>>
>> Stop right there. NO. That is NOT normal behavior, and if we require it
>> in order to work we have made a mistake.
>>
>> There should be NO casting required to get work done in client code.
>
> Except that for the most part, that's the only way that immutable objects can
> be created - particularly if you're talking about arrays or AAs. It's _very_
> common to do what Walter is describing. On top of that, we're forced to cast
> to immutable or shared to pass anything via std.concurrency, which causes
> pretty much the same problem. We're not even vaguely set up at this point to
> have type qualifiers indicate how something was constructed or what thread it
> comes from.
>
> - Jonathan M Davis

The way I see it we must devise a robust solution to that, NOT consider 
the state of the art immutable (heh, a pun).

Andrei



More information about the Digitalmars-d mailing list