From: Gavin Kistner Date: 2006-10-06T05:17:09+09:00 Subject: Compound Parallel Operators ------_=_NextPart_001_01C6E8BB.35ED1A90 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable (I didn't see an RCR for this, and my lazy 60s of searching didn't find any discussion about it. If it's been discussed before, just say so and I'll go hunt for the discussion properly.) =20 Ruby allows parallel assignment: a,b,c =3D x,y,z =20 Ruby interprets compound operators: a *=3D x as a =3D a * x =20 Wouldn't it be nice if all compound operators worked with parallel assignment? a,b,c *=3D x,y,z would thus be interpreted as a *=3D x b *=3D y c *=3D z =20 I think it'd be nice, anyhow. It simplifies a small subset of code, but it seems like a simple logical extension. (And, it's currently a syntax error, so there's no backwards compat issues, right?) =20 a,b,c +=3D *vals versus a,b,c =3D [a,b,c].zip( vals ).map{ |a,b| a+b } or a +=3D vals[0] b +=3D vals[1] c +=3D vals[2] ------_=_NextPart_001_01C6E8BB.35ED1A90--