Object Oriented Programming in NeWS

Created: 2022-09-17T18:02:54-05:00

Return to the Index
This card pertains to a resource available on the internet.

Runs PostScript with additions:

Dictionaries: read and write operates on the topmost dictionary of a stack. When no dictionary is there the default is the global dictionary and if a dictionary is pushed then read/write happens to that one.

Dictionaries have prototypes so when something is not found in the dictionary another dictionary is checked for a value.

Messenging is SmallTalk style with a sender capture: push keyword target, push object, call send. Reference to call site is pushed and method is looked up in class heirarchy.

dictbegin/dictend verbs open and close dictionary definitions.

classbegin/classend verbs open and close class definitions.

/NewObject BaseClass
dictbegin % instance variables and their defaults
/value 0 def
dictend
classbegin
/classvalue 0 def % class variables and their defaults

/methodname {
% does stuff
} def
classend def