CTFE thoughts & functional approach

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Tue Feb 2 00:39:34 PST 2016


On Tuesday, 2 February 2016 at 08:34:38 UTC, Robert M. Münch 
wrote:
> On 2016-02-01 08:15:11 +0000, deadalnix said:
>
>> I'm not sure what is preventing you from doing that already. 
>> There is compile time reflection (has access to some compiler 
>> internals) and D support functional style. Unless you have 
>> some specific in mind, I don't think there is anything we can 
>> do to help here. t seems you already have the pieces you want.
>
> See my other example. Yes, maybe I can do everything already, 
> but it's not straightforward. I have to fiddle around a lot to 
> get it to work.
>
> Of course that can be my incompetence with CTFE. However, my 
> experience and intuition is that what I would like to use CTFE 
> for (code-generation depending on some other parts of the code 
> like enums, presence of member functions, etc.) can be done 
> much simpler than at the moment.

That is definitely true that the compile time API is kind of 
screwy. That's definitively not you. I think the best path 
forward at this stage is to provide nice API as a library on top 
of it.


More information about the Digitalmars-d mailing list