If you think about it, an object **is** a node in a graph, and its instance variables are the arcs! Just as LISP is based on list nodes, OOPLs are based on tree nodes. In fact, the phrase "object **graph**" is in common use.
Of course, a "TreeNode" or "GraphNode" class still has value: it provides both a standard interface/protocol for graph navigation (e.g., what message does one send to get all the arcs (or all the children) of a node), and also a home for graph-theoretic algorithms (e.g, topological sort).
--Alan
Jerome Garcia wrote:
I have not been able to find a generic node class in Squeak. Does Squeak provide a node class similar to the TreeNode class provided by Dolphin Smalltalk? If not, is there a reason why it should not? Jerome E. Garcia jegarcia@adventurousmind.com