Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why GNU Smalltalk uses brackets for method bodies?

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?

like image 628
Vladimir Keleshev Avatar asked Mar 25 '13 14:03

Vladimir Keleshev


1 Answers

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.

like image 95
Uko Avatar answered Oct 18 '22 00:10

Uko