"Rainer Deyke" <[email protected]> wrote in message news:[email protected]... > Nick Sabalausky wrote: >> True, that's why I replied again and suggested something like: >> >> [mydic[x], mydic[y], mydic[z]].each = mydic.length; > > [[mydic[x], mydic[y], mydic[z]].each].each = mydic.length; > [[[mydic[x], mydic[y], mydic[z]].each].each].each = mydic.length; > [[[[mydic[x], mydic[y], mydic[z]].each].each].each].each = mydic.length; > ... >
I'm not sure what point you're trying to make here, but my idea is that "each" would basically be a write-only "extension property" (to borrow C# terminology) of array. So "each" wouldn't have a getter or a return value and therefore trying to stick its non-existant read/return value into an array literal (as you're doing above) would be an error. > > What's wrong with assignment chaining? I'm amazed anybody would find > chained assignment more confusing than unchained assignment. > I never said I had any problem with assignment chaining. I find them very straightforward (provided that their function-evaluation order is "rhs first, then lhs"). I'm just saying that if there's compelling reason to say "ok, assignments shouldn't be expressions", for the sake of simplifying certain aspects of the language, and would therefore be giving up assignment-chaining, then we wouldn't have to resort to temp-var and non-DRY methods to assign a single value to multiple targets. ...I suppose I was getting a little farther off-topic than I thought I was, maybe that's where the confusion came from.
