Thread overview
newCTFE Status November 2017
Nov 19
Nordlöw
November 18
Hi Guys,

I know there has been a lack of visible activity lately in the field of newCTFE.

But fear not, there is progress; even if it is much slower then before.

I just implemented support for varadic function templates.

(which produces a curious AST in which you have more arguments then parameters ;))

luckily this was easily fixed because dmd provides a way to iterate over the expanded parameter tuple. The elusively named (Parameter.getNth) function.

which looks like this:

    /***************************************
     * Get nth Parameter, folding in tuples.
     * Returns:
     *      Parameter*      nth Parameter
     *      NULL            not found, *pn gets incremented by the number
     *                      of Parameters
     */
    static Parameter getNth(Parameters* parameters, size_t nth, size_t* pn = null)
    {
        Parameter param;

        int getNthParamDg(size_t n, Parameter p)
        {
            if (n == nth)
            {
                param = p;
                return 1;
            }
            return 0;
        }

        int res = _foreach(parameters, &getNthParamDg);
        return res ? param : null;
    }

Notice how pn is never actually touched!
and therefore will not get incremented.
November 19
On Saturday, 18 November 2017 at 13:54:45 UTC, Stefan Koch wrote:
> Hi Guys,
>
> I know there has been a lack of visible activity lately in the field of newCTFE.
>
> But fear not, there is progress; even if it is much slower then before.

Great. Is there a checklist for what's left before newCTFE is ready for formal review?
November 19
On Sunday, 19 November 2017 at 17:03:32 UTC, Nordlöw wrote:
> On Saturday, 18 November 2017 at 13:54:45 UTC, Stefan Koch wrote:
>> Hi Guys,
>>
>> I know there has been a lack of visible activity lately in the field of newCTFE.
>>
>> But fear not, there is progress; even if it is much slower then before.
>
> Great. Is there a checklist for what's left before newCTFE is ready for formal review?

I guess that would be union and delegate support at the very least.
Also the newCTFE-ABI needs to be documented.