Unused druntime code: Barrier, ReadWriteMutex, Condition

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jun 16 10:38:27 UTC 2026


On 16/06/2026 10:32 PM, Denis Feklushkin wrote:
> On Tuesday, 16 June 2026 at 08:23:11 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
> 
>> Druntime cannot import phobos.
>>
>> Phobos depends upon druntime.
>>
>> Binary loading is acyclic, not cyclic.
> 
> By the way, this is off-topic, I have one more suggestion on this matter 
> sounding like:
> "druntime cannot import core.stdc"
> 
> I.e., core.stdc shouldn't be necessary.
> 
> Let the druntime use these functions through wrapper functions. There 
> will be only about 10 of them in total, I think: malloc/free, some sync 
> methods...
> 
> This will solve 95% of porting issues to any system

Chuck it into a module called core.internal.platform and sure.

You shouldn't need wrapper functions for the most part. Aliases will 
suffice. I.e. malloc is perfectly fine as an API, just needs a different 
name so it can be swapped out easily.



More information about the Digitalmars-d mailing list