What's the difference of ANSI Smalltalk and Smalltalk-80?
Asked Answered
G

1

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?

Gormand answered 16/6, 2011 at 7:13 Comment(0)
C
15

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.

Centra answered 16/6, 2011 at 19:55 Comment(2)
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?Gormand
Yes, it is possible. Seaside for example runs on most Smalltalk platforms. See our coding conventions for details: 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.Sigh

© 2022 - 2024 — McMap. All rights reserved.