[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: multiple variable reference, etc.



>as i've noted to the list, the next version of es will have multiple
>variable assignment.  that is,
>
>        x y z = 1 2 3 4
>
>is the same as
>
>        x = 1
>        y = 2
>        z = 3 4
>
>by symmetry, i think that
>
>        $(x y z)
>
>should be equivalent to
>
>        $x $y $z

Why? All this seems to be way out on the fringes of the language and
really does not contribute to the overall structure of es.  (Perhaps
I've missed something here?) Therefore, I think that in the interest
of simplicity (and the interest of not creating [sic] dark corners), I
think that this idea should be abandoned.

>before people reject this idea out of hand, i want to point out why
>i think that this makes sense.  if you have
>
>       foo = a b
>       $foo = 1 2 3

>then it makes sense that
>
>       $foo
>
>would expand to
>
>       1 2 3

 This seems contradictory to other shell behavior. Variables
are always expanded _before_ anything is evaluated. That means that

	fu = bar
	$fu = bar

should yield

	bar = bar

This exception to the normal order of evaluation seems quite
unnecessary. I don't even really see the point.

-erik