Re: Pass by Reference
- Posted by mattlewis (admin) Jan 04, 2015
- 2712 views
Firstly, the {i,j,k} = <expr> syntax has already been implemented1.
1 Bear in mind I can only be authoritative about Phix, however I think it is also true for OpenEuphoria.
Yes. This has been implemented for 4.1.
Given the way Eu is based on sequences, it somehow "fits". Otherwise, no real reason, except perhaps that
i,j,k = {1,2,3}
starts to get misleading
Yes, it simply seemed more euphoric, IIRC. Or maybe no one thought to have naked LHS sequences like that. It's been a couple of years at this point.
which is genuinely misleading. That absolutely has to return {1,2,3}, otherwise you've suddenly got issues with
if ... then return 1,2 else return 1,2,3
and, given there is only one eax/rax, subsequent implications for the system stack, call_back(), etc.
I'm sure that even if we'd gone with that syntax, we'd have to have turned it into a sequence. Probably better not to start removing stuff like that. Then the language starts to look like ruby, or something.
Matt