|
|
|
|
|
by draegtun
5444 days ago
|
|
The syntax is quite unique to Smalltalk. The message, otherwise known as “method call” in other languages, is called show: (including the colon) and it takes an argument. self also uses this method call syntax. However this syntax can get quite confusing, see this example from http://en.wikipedia.org/wiki/Self_(programming_language) valid: base bottom between: ligature bottom + height and: base top / scale factor.
Smalltalk version provided gets even more verbose: valid := self base bottom between: self ligature bottom + self height and: self base top / self scale factor.
Personally I prefer Io message syntax because it has far less ambiguity. See Why not use an infix message syntax like Smalltalk? in the FAQ - http://iolanguage.com/about/faq/ |
|