TempAlloc review starts now

Steven Schveighoffer schveiguy at yahoo.com
Mon Jun 6 10:49:17 PDT 2011


On Mon, 06 Jun 2011 08:51:27 -0400, dsimcha <dsimcha at yahoo.com> wrote:

> On 6/6/2011 7:24 AM, Timon Gehr wrote:
>> simendsjo wrote:
>>> I have very limited experience with D and haven't taken the time to
>>> understood the code, but here are
>>> some easy nitpicks :)
>>> ----
>>> imports: Should stuff in core really depend on phobos? Isn't much of  
>>> the
>>> reason for core to allow
>>> different "standard" libraries like tango?
>>> [snip.]
>>
>> Actually the code doesn't depend on phobos. You can change the set of  
>> imports to:
>>
>> import core.memory, core.exception, core.stdc.string;
>> static import core.stdc.stdlib;
>>
>> It will still compile. Good point though. That needs to be changed.
>>
>>
>> Timon
>
> Wow.  I have no idea how these dependencies on Phobos slipped past me.  
> Probably because I'm so used to thinking of std.range, std.algorithm,  
> etc. as fundamental parts of the language.  They absolutely, 110% must  
> be gotten rid of if this is to go into druntime.  This may necessitate  
> breaking this proposal up into two:  TempAlloc itself in druntime and  
> the higher level convenience functions (tempdup, stackCat, etc.) in  
> std.array.

Without actually even looking at it (yet), I don't see why this goes into  
druntime in the first place.  From my experience with druntime, things  
should go in there only if the compiler or runtime needs them to work.  Is  
there a proposed usage for TempAlloc in druntime or for the compiler?

-Steve


More information about the Digitalmars-d mailing list