Object Oriented Extensions to Forth Richard Pountain London ...

3 downloads 22 Views 379KB Size Report
Richard Pountain. London, England. ABSTRACT. 205. The paper will describe two iterations in the evolution of a set of object oriented extensions to FORTH-79, ...
Proceedings of the 1985 Rochester Forth Conference

205

Object Oriented Extensions to Forth Richard Pountain London, England ABSTRACT The paper will describe two iterations in the evolution of a set of object oriented extensions to FOR TH-79, based loosely on the syntax and semantics of Smalltalk-80. The initial inspiration for the project was a desire to create a structured data facility in FORTH, equivalent to records in Pascal (as an illustration for a book chapter on Data Structures in FOR TH). The initial idea was to use the existing CREATE•...• DOES mechanism for this purpose. This end was easily achieved by writing a defining word which produces "smart" identifiers with which to address the fields of a record. Having accomplished this, the author noticed that in fact CREATE... DOES contains the seeds of a far more powerful data abstraction mechanism, namely classes as in Simula or Smalltalk. It is equivalent to a class constructor without any inheritance mechanism. *This paper has been submitted for publication in the Journal of Forth Application and Research.

206

The Journal of Forth Application and Research Volume 3 Number 2

Suggest Documents