From: Michael Hollins Date: 2007-06-01T16:20:17+09:00 Subject: Re: Ruby bug in +=? zarawesome@gmail.com wrote: > On Jun 1, 3:00 am, james.d.mast...@gmail.com wrote: >> Rewrite this longhand as: >> >> $list = []; >> $list = $list + [function()]; >> >> Which really means: >> >> $list = [] + ["d"] > > Yeah, figured. It's just odd, and allows for some nice obfuscated > coding. > > I'd suggest what's making for the obfuscated code here is not +=, but the use of a global variable and a function that has side effects. The behavior of += doesn't seem odd to me. I'd say it's well defined.