Subj : Re: How-to on writing an interpreter? To : comp.programming From : Jon Harrop Date : Tue Jul 19 2005 02:05 am osmium wrote: > "Rob Thorpe" writes: >> Actually I can't think of anything less useful for contructing trees >> than OO. It can be done very simply using procedural programming. > > For one tree, fine. But what if you want several trees in one program? > Or want to write a tree once and be done with it, i.e., keep reusing the > same tree logic in several programs? Factor out the common data structure and functions. That can be done with or without OO but it is much easier in the presence of parametric polymorphism and higher-order functions. If you want to see how this is done then look at the source code of any common ML compilers. -- Dr Jon D Harrop, Flying Frog Consultancy http://www.ffconsultancy.com .