Re: Pass by Reference

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

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.

petelomax said...

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.

petelomax said...

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu