Question

In GNU Smalltalk manual it is written that:

Unlike other Smalltalks, method statements are inside brackets.

So I'm wondering, why there would be such an arbitrary deviation from Smalltalk-80?

Was it helpful?

Solution

Original Smalltalk-80 had UI on it's side, so you added classes, added methods to classes using UI, could browse them with ease. Methods were not meant to be inside of the class in a text file.

Now when you work with GNU Smalltalk it makes the most impact on scripting in command line and storing scripts inside of the text files. So you need a way to define a method and a class inside of the script.

The same applies to Coral. If you'll read What is Coral? > A tiny syntax extension there is also an extension to allow defining methods inside the script.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top