On Thu, Aug 26, 2010 at 14:11, Stanislav Blinov <bli...@loniir.ru> wrote:

>  Sorry, I pressed the wrong button so the message was sent to your email.
> Reciting:
>
>
> Does that work for you?
>>
>>  Yes! Beautiful, thanks! That beats hell out of my clumsy templates :)
>

Your templates are not clumsy, it's typically the way some other PL would
process lists/arrays. I used to write a lot of these. But 6 months ago, CTFE
got seven-leagues boots and right now it's much easier on the eye to use CT
functions.


>
> When I was on the way to my initial solutions I was under strong impression
> that T[N] func() won't work. Now I see that was because I didn't bother to
> fully understand how arrays are returned from functions. I got it now, so
> thanks a lot again!
>

There used to be a time, maybe not 18 months ago where returning static
arrays from functions was not possible, IIRC. Right now, I think you can use
them with no problem. Maybe someone well-versed in optimization will tell us
it's not a good idea, I don't know.


Philippe

Reply via email to