Re: Pass by Reference
- Posted by useless_ Jan 14, 2015
- 2285 views
On this return thing, i agree with David's syntax using no brackets or parentheses, but using a comma. Matt's way using brackets makes sense only if you mentally apply a loopy self-referential way of looking at it.
[a, b] = foo(2)
foo(2)[{a},{b}] = foo(2)
or something like that. I could be wrong.
I suspect this is because of how one must look at the guts of Eu, while the rest of us look at the outside of Eu. But Matt, as the mere simple-minded users of the language, we humbly request the interface to the guts be how we keep asking it to be. (I am not joking, i would lose some part of me if i had to do what you do on the insides of Euphoria. We are just different people, doing different things differently.) This is basically so we can keep our minds on the application, and not how what we want must be expressed in the programming language. It's a bigger jump between human and programming language than between most human languages (at least to me). David's comma is merely glossing over the intricate details and presenting the way some of us inherently automatically would do it when our minds are on the application instead of the programming.
So, i request the comma way of writing the returned values. Also, not crashing when doing
a,b,c = return(1,2) ; a=1, b=2, c becomes some default value
would be nice too, after all, we can do it the other way 'round
procedure foo(sequence a, atom b, object c = 0)
useless