CTFE and DI: The Crossroads of D

deadalnix deadalnix at gmail.com
Thu May 10 14:25:18 PDT 2012


Le 10/05/2012 22:39, Adam Wilson a écrit :
> On Thu, 10 May 2012 12:51:03 -0700, deadalnix <deadalnix at gmail.com> wrote:
>
>> Le 10/05/2012 20:35, Adam Wilson a écrit :
>>> The problem is that it DOES NOT know if it's CTFEable or not. No
>>> analysis is performed prior to DI generation!
>>>
>>
>> It doesn't seems undoable.
>
> It isn't, but it would require that DI generation got it's own
> specialized form of semantic analysis, and that is a significant amount
> of work. I'm not saying it shouldn't be done, just that it's not a valid
> short-term solution. A long-term solution would be to embed a
> semantically analyzed form of the source into the object itself. But
> that's years away with concerted group effort.
>

I wouldn't introduce a language feature for short term solution. This 
can lead to tedious technical debt to manage.


More information about the Digitalmars-d mailing list