Although I do like to read this mailing list I do not use a lot Squeak mainly because I have a small&slow computer which is using mostly DOS as an operating system. Which means I have to borrow my sister big computer to use Squeak (a 486DX4-100, HD 512Mb).
I'd like to find a modern combo language+OS that doesn't take much to be run and for now it seems it's going to be Oberon, but I use to change of language or programming language almost every week. :-)
First I'd like to tell that the BNF grammar of Squeak that was posted here recently did looked pretty usefull for someone wishing to learn Squeak, without any needs to add more semantical information. Such a BNF grammar is a great reference when learning a new language.
I like the ability to explore Squeak with the browsers. I did also like to see the multiple message dispatching of Smalltalk. But like I said before I don't use it much, and the only program I wrote in Squeak was a small 'Guess my number' game that was writing on Transcript and reading numbers from FillInTheBlanks. I was trying to make all this in one window, when I was beginning to explore the MVC concept and I did get lost there and was not trying much harder at Squeak ever since. Although most others GUI must be using controllers I never have seen them before using Squeak. I suppose others language and GUI are simply hiding them.
Since it seems that Squeak is, with the 'language and polymorphism' thread, thinking about how to make itself better, this was making me to think about a message I read here about the future of Squeak that could become be more expressive by using new ideas proposed by researcher Luca Cardelli.
Although that Cardelli is using a mathematical formalism that I don't really understand, I do have my way of understanding his ideas and I would summarize them in two ideas. First an objects is a bunch of fields, and this fields can all be changed. A field can be any value, including, and that what is new, a method value. So an object can modify his methods or add new ones.
Second idea: an object can be cloned. So rather than using classes the way we do with Smalltalk, we can create a function that clone a base object and return it.
This seems to give much more expressive power, and with it the possibility to make code that is much more harder to read and understand. Anyway my feeling is that it is worth it.
Cardelli have made a language (in 1995?) that is using these concepts and add the idea that you can also make an assignment not only to local fields (normal values or methods values) but also to fields of objects on remote computers, making this way a distributed language.
This language is called Obliq. It is distributed with an other language in which it was implemented: Modula-3. Modula-3 take about 1Gb of hard disk space and that much much more than I have. So I never saw Modula-3 neither than I saw Obliq.
I'd like to ask if there is someone working at making Squeak using these ideas. This could well be the case because I read about Cardelli here some months ago.
Cardelli have also wrote a not so funny paper about user interface. It seems also that Obliq is using a powerful user interface looking like Visual Basic. Maybe Squeak could be one day using such an interface that would maybe be simpler than current MVC model?
Since that the original thread was about what's polymmorphism I'd like to say that Cardelli have also wrote one or two papers describing what it is.
From memory, I would say that the web page of Cardelli is:
www.luca.demon.co.uk (but my browser seems to make a bad request.) Maybe the easy way is to follow the links from Yahoo on Obliq.
I am not saying Squeak should follow this path. I guess Obliq have a mystical look to me because I have not really seen it yet. Somehow I guess I am trying to have others use it so that they can tell me if it is as good as I amagine it. :-)
dufrp@oricom.ca wrote:
... Although that Cardelli is using a mathematical formalism that I don't really understand, I do have my way of understanding his ideas and I would summarize them in two ideas. First an objects is a bunch of fields, and this fields can all be changed. A field can be any value, including, and that what is new, a method value. So an object can modify his methods or add new ones.
Second idea: an object can be cloned. So rather than using classes the way we do with Smalltalk, we can create a function that clone a base object and return it.
This seems to give much more expressive power, and with it the possibility to make code that is much more harder to read and understand. Anyway my feeling is that it is worth it.
This is actually a quite good description of the language Self, which was inspired by Smalltalk. Self does both of the two ideas: 1. The slots of an object can contain methods or values. Accessing both looks perfectly similar. If you imaging a Smalltalk where you access every variable with a message send to self, and leave the 'self' out for better readability, you get something very close to Self. 2. Self does not have classes but prototypes. That is, objects are not made from descriptions of their structure but from examples.
Although I did not work with Self (it had/has a somewhat unesthetical appetite for memory which made me unable to run it on any machine I could get hold of at that time) I have some reservations about the concept of prototype languages. The main thing is that I feel there should be the 'platonic' difference between the concept of a thing and the thing itself. Having the code of a class separate from any instances makes me feel more secure in managing an manipulating this code. Self seems to handle this problem with the introduction of 'traits' objects which contain the behavior of a 'class' of objects. Instances are typically not created by cloing this 'traits' object but a prototype object which has the 'traits' object in a parent slot (a slot that's used for method lookup in a hierarchy). This looks a lot like classes to me... so even Self does not seem to be able to live without them.
Other people on the list can certainly say more things about Self, from actual experience...
Hans-Martin
squeak-dev@lists.squeakfoundation.org