CTFE and DI: The Crossroads of D

Adam Wilson flyboynw at gmail.com
Wed May 9 14:09:10 PDT 2012


On Wed, 09 May 2012 14:02:06 -0700, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:

> On Wed, 09 May 2012 16:45:36 -0400, Adam Wilson <flyboynw at gmail.com>  
> wrote:
>
>> On Wed, 09 May 2012 13:43:12 -0700, Timon Gehr <timon.gehr at gmx.ch>  
>> wrote:
>>
>>> On 05/09/2012 10:40 PM, Adam Wilson wrote:
>>>>
>>>> ... unfortunately, Phobos won't compile with the
>>>> patch applied because of the CTFE reliance on the DRT source.
>>>>
>>>
>>> It is actually the .di reliance. Maybe you should just fix the  
>>> makefile so that it does not generate .di files for druntime.
>>
>> It's not that easy. Phobos imports the DI's and it's make file would  
>> need to be adjusted as well. Which could very well break other things.  
>> Also, see the issues with SharedLibs. The issue of runtime commonality  
>> is no small deal.
>
> core.time is not exactly "runtime".  It's simply contains types *used*  
> in the runtime.  I don't see why it needs to be dynamic whatsoever.
>
> I think the right solution might be to split modules into "support"  
> modules, and "runtime" modules, and only .di the runtime modules.

Essentially re-architect the DRT? I can see the argument for this,  
although from a consistency point of view the support modules should be  
.di extensions, that way in import statement is just *.di. It would  
certainly make it that much easier to build the DRT as a Shared Library.
Is there any support on this idea from the community and from the  
stakeholders on the DRT?

> When I think of runtime parts of core, I think of the GC, threads, and  
> synchronization pieces (I think maybe intrinsics are there too).   
> Everything else is there as support.
>
> -Steve


-- 
Adam Wilson
IRC: LightBender
Project Coordinator
The Horizon Project
http://www.thehorizonproject.org/


More information about the Digitalmars-d mailing list