Contexts or Lists for object oriented programming in NewLisp

Started by Sunburned Surveyor, June 02, 2005, 12:45:59 PM

Previous topic - Next topic

Sunburned Surveyor

Question for the NewLISP pros:



I am setting up a programming library in NewLisp, and I would like to use an object-oriented programming model. I know that this can be accomplished using contexts in NewLISP, but I believe it could also be accomplished with lists.



For example, my geometry library will contain "point" objects, with 3 simple properties, or symbols. (One property for each coordinate value.)



I could represent each point object with a context, or each point object with a list containing the 3 properties as the list elements.



What are the advantages and disadvntages of each method? (As far as speed, memory usage, simplicity, and ease of use?)



Thanks,



The Sunburned Surveyor