Curly Braces?

Dan Ingalls Dan.Ingalls at disney.com
Tue Jan 9 06:03:12 UTC 2001


>In the swiki I found two pages saying it is posible to use Curly Braces
>to assing more than one variable at time in the form:
>
>{a. b} := #(1 2)
>
>or in form,
>
>{a. b} := {1. 2}
>
>In Squeak 2.8 this does not work...
>
>Anyone know why?

Yes.  I took out structure assignment between 2.6 and 2.7.

It was essentially never used and, when used, could be really confusing, as in...

	{a. {b. c}. e. f} := thingPassedFromElsewhere.

It seemed to me that when you're willing to take this much trouble to work with a bundle, it must be time to use an object.

FYI, this form had not compiled since somewhere between 1.16 and 1.19 due to an interaction with the check for uninitialized variables.  There was not a peep from the mail list about this feature being broken then or missing now until your message.

The other uses of {} as an array constructor seemed to be carrying their weight, so I left them in, and made them more efficient in both speed and stack use.

We need to amend the Swiki (can you send the page refs?).  Thanks for pointing this out.

	- Dan

PS:  If you are seriously interested, I just checked that this form did work completely in 1.16, and it works in 2.6 if you proceed through the compiler complaints.






More information about the Squeak-dev mailing list