Live data from Hacker News

Smalltalk: Welcome to the Balkans

threeriversinstitute.org

21–23 of 23 posts

Re: Smalltalk: Welcome to the Balkans

#21
post #6

Earlier quoted context omitted.

I seem to recall hearing (from the GNU Smalltalk author) that the text representation of Smalltalk isn't even standard. See http://www.gnu.org/software/smalltalk/manual/html_node/Synta... , for example.

Why would it be suprising that there isn't a standard text file representation of something that is hardly ever represented that way?

Why? Well, smalltalk didn't always have nice OO code management tools. You used to have a good handle on your "changes" and "sources" files. At one point (early '90s), it was not a problem to take code from a text file you "filed-out" in Digitalk smalltalk and "file-in" the same text in ParcPlace's smalltalk.

In those days, there were only two good ways to "version" your code: 1 - copy the entire image pared with "changes" and "sources" files; 2 - "file-out" some or all of your code to a text file. I did this often. It is fair to say that less professional developers did not do this, but that's no different than today's developers that don't use any form of version control.

Re: Smalltalk: Welcome to the Balkans

#22

Earlier quoted context omitted.

> I too find it a bit disturbing not to be able to import/export changes to the base image as text-files and being unable to build a clean image from source-code only. I also find that disturbing. Another vthing i find disturbing, which may be a related problem is that although Smalltak lets you do all sorts of cool things like rotate its menus 30 degrees while the application is still running, often it just doesn't…

I find having a live interactive debugger on the actual data makes it far easier to 'get the state of the system' rather than some text files which have very little to do with the state of the system and usually just represent code whereas a 'system' is a combination of code and data.

That's a very valid point -- actually being able to see the state of the data it very important in knowing what's going on. As Brooks and Raymond put it: "Show me your code and conceal your data structures, and I shall continue to be mystified. Show me your data structures, and I won't usually need your code; it'll be obvious."

But can you do this in Smalltalk? OK, you have inspectors that show you a representation of your data, but the representation is incomplete. I haven't used Smalltalk in years, so I'll gave an example in Python to show what I mean:

   >>> a = [1,2]
   >>> b=[a,a]
   >>> c=[[1,2],[1,2]]
   >>> b
   [[1, 2], [1, 2]]
   >>> c
   [[1, 2], [1, 2]]
   >>> b[0][0]='x'
   >>> b
   [['x', 2], ['x', 2]]
   >>> c[0][0]='x'
   >>> c
   [['x', 2], [1, 2]]
(b) and (c) initiallly have the same representation, but they behave differently. I don't like this, so I'm creating a language where the text representation of an object defines how it behaves: if two objects have the sdame representation, their internal structure is the same, and their behaviour will (with one exception) be the same. This representation format is used as a serialisation format, and is also used to write literals in the language. This means that it's possible to display precisely the value of any object, including all the sub-objects it contains.

Re: Smalltalk: Welcome to the Balkans

#23

Earlier quoted context omitted.

I find having a live interactive debugger on the actual data makes it far easier to 'get the state of the system' rather than some text files which have very little to do with the state of the system and usually just represent code whereas a 'system' is a combination of code and data.

That's a very valid point -- actually being able to see the state of the data it very important in knowing what's going on. As Brooks and Raymond put it: "Show me your code and conceal your data structures, and I shall continue to be mystified. Show me your data structures, and I won't usually need your code; it'll be obvious." But can you do this in Smalltalk? OK, you have inspectors that show you a representation o…

Yes you can because 'a' is an object and your array [1,2] is a different object. They have the same value but a different identity. You can use a smalltalk inspector to see both value and identity.
Post reply on HN