Multiple return value as requirements for safety and performance

Ilya Yaroshenko via Digitalmars-d digitalmars-d at puremagic.com
Sat Dec 24 13:28:55 PST 2016


On Tuesday, 20 December 2016 at 17:28:49 UTC, Stefan Koch wrote:
> On Tuesday, 20 December 2016 at 17:15:53 UTC, Ilya Yaroshenko 
> wrote:
>>
>> Are they already CTFEable? I have not seen an anounce, sorry
>
> They have been for years now.
> Of course only pointers from a CTFE context are valid at ctfe.
>
> The new engine will support them as well, (as it will 
> eventually support everything with the exception of 80bit reals)

`Tuple` + pointers do not help. Multiple auto ref values are 
required anyway. The reason is that tuple.expand analog can not 
pass something by reference from original ranges (it has pointers 
and values).

Multiple auto ref values are required to have syntax like this:

zip(a, b).each!swap;

I know that we have swapRanges, but this is not solution for Mir 
because Mir should have small API without hundreds of trivial 
functions like in Armadillo.

Thanks,
Ilya


More information about the Digitalmars-d mailing list