| ▲ | Rochus an hour ago | |
In contrast to the "usual" (i.e. Simula 67 based) OO approach, Wirth avoided virtual methods in his Oberon language, but instead used type extension (i.e. inheritance) to declare specialized message records (as the replacement to variant records of Pascal and Modula) which were handled by procedure-typed fields of record variables (i.e. objects) using polymorphic dispatch based on the dynamic message type. The intention was not to "correspond better" to Kay's vision (Wirth likely didn't know Kay nor was he interested in his visions), but he arrived at a similar design from a different motivation. And the analogy only holds when considering what Kay and team actually implemented (i.e. "message delivery" - a record in case of Oberon, a stream of tokens in case of Smalltalk-72 - via synchronous call semantics). Smalltalk-80 instead implemented compiled virtual methods and table-based polymorphic dispatch like Simula 67, just with a dynamically typed language. | ||