From: Hal Fulton Date: 2013-07-09T06:06:15+09:00 Subject: A very half-baked idea: setting local variables --047d7b343eaefa4bf304e1064df3 Content-Type: text/plain; charset=ISO-8859-1 I'm sure this nonexistent feature is not in great demand, but there have been different times that I (and other people) have wanted it. This is not a "really serious" proposal, but I wanted to see what other people's comments were about lengthy multiple assignments and how to deal with them. Sometimes I wish I had an alternative way to do assignment. Example: foo, bar, baz, alpha, beta, gamma, fred, bill, joey = *values In a case like that, my eye has to scan a long way to the right before finding the equal sign and grasping that this is a multiple assignment. I like this better: vars = [:foo, :bar, :baz, :alpha, :beta, :gamma, :fred, :bill, :joey] assign values, vars Note that this wouldn't be a method call (like alias_method) but a keyword (like alias) unless "binding of caller" was permitted... which is another thing I've wanted but I suppose will never happen. Comments, questions, projectiles? Hal --047d7b343eaefa4bf304e1064df3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm sure this nonexistent feature is not in great dema= nd, but there have
been different times that I (and other people) have = wanted it.

This is not a "really seriou= s" proposal, but I wanted to see what other
people's comments were about lengthy multiple assignments an= d
how to deal with them.

Som= etimes I wish I had an alternative way to do assignment.

Example:

=A0 foo,= bar, baz, alpha, beta, gamma, fred, bill, joey =3D *values

In a case like that, my eye has to scan a long way to= the right
before finding the equal sign and grasping that this is a multip= le
assignment.

I like = this better:

=A0 vars =3D [:foo, :bar,= :baz, :alpha, :beta, :gamma, :fred, :bill, :joey]
=A0 assign values, vars

Not= e that this wouldn't be a method call (like alias_method) but=A0
<= div style>a keyword (like alias) unless "binding of caller" was p= ermitted...
which is another thing I've wanted but I suppose will never<= /div>
happen.

Comments, ques= tions, projectiles?

Hal

--047d7b343eaefa4bf304e1064df3--