Send to Printer


Brace Constructor Syntax in VW or OS

January 12, 2010 8:15:54.207

If you're trying to port code from Squeak or Pharo to VisualWorks and/or ObjectStudio, one thing you may have run across is the Brace Constructor syntax for arrays. i.e., instead of:.

array := Array 
			with: 3+4
			with: Date today.

You get:

array := {3+4. Date today}.

Today's screencast looks at adding support for that syntax to VW and OS:

If you like this kind of video, why not subscribe to "Smalltalk Daily"?

Technorati Tags: , ,

posted by James Robertson


this does not apply to ObjectStudio

[HKN] January 14, 2010 4:23:53.880

because ObjectStudio has already its own brace constructor for defining arrays which works differently and does not evaluate the expressions. The example code given results in ObjectStudio 8 in an array of six elements, two SmallIntegers and four Symbols: {3 #+ 4 #, #Date #today}

Loading the contributed parcel does not override this behaviour.

 Share Tweet This