10

I discovered there is no mentioning about thisContext in ANSI Smalltalk specification (draft).

I assumed ANSI Smalltalk as standardized Smalltalk-80, so I can't understand why it's not there. What's the difference of them?

eonil
  • 83,476
  • 81
  • 317
  • 516

1 Answers1

14

Smalltalk-80 refers to a very specific thing: the version of Smalltalk that was in use at Xerox Parc back in 1980. While there are many Smalltalks that are based, either in a direct sense (Squeak and Pharo) or an ideological sense (Ambrai Smalltalk and GNU Smalltalk), on that environment, there are no Smalltalks around today that actually fully adhere to the language and virtual machine described in that book. Even Squeak, which is probably the closest ideologically, has some major deviations: Squeak has closures, Smalltalk-80 does not; Squeak has Unicode, Smalltalk-80 does not; Squeak's VM supports and uses named primitives, Smalltalk-80 does not; Squeak support some bytecodes that Smalltalk-80 does not; and so on.

ANSI Smalltalk, like ANSI Common Lisp, attempted to define a standard that incorporate a common subset of Smalltalk functionality across the major Smalltalk implementations. Since the ANSI standard was written in 1998, it had to take into account far more than just the original implementation. In particular, some at-the-time major Smalltalks, such as Smalltalk MT and VisualAge Smalltalk, lacked continuations entirely (and a thisContext variable as a result). That feature is therefore absent from the ANSI standard.

In practice, these differences are somewhat academic. You're worried about thisContext, but GNU Smalltalk has a radically different syntax, VisualWorks has namespaces, Squeak has Traits, Pharo lacks MVC...there are simply more pressing differences. Smalltalk-80 and the ANSI Smalltalk draft are both more guidelines than anything else at this point in Smalltalk's life.

Benjamin Pollack
  • 27,594
  • 16
  • 81
  • 105
  • Thanks for details! Is it possible making *compatible* program on many implementations with ANSI subset? How many implementations conform ANSI? And what's the Smalltalk-80 compatible means in some implementation like Squeak? – eonil Jun 17 '11 at 01:32
  • 4
    Yes, it is possible. Seaside for example runs on most Smalltalk platforms. See our coding conventions for details: http://code.google.com/p/seaside/wiki/CodingConventions. Most Smalltalk conform to ANSI today, because Seaside requires (and tests) it. ANSI compatibility means that classes and methods are implemented and behave as described in the ANSI standard. – Lukas Renggli Jun 18 '11 at 07:08