newLISP Fan Club

Forum => newLISP newS => Topic started by: Lutz on February 03, 2008, 06:46:46 AM

Title: a Functional Object Oriented Programming (FOOP) example
Post by: Lutz on February 03, 2008, 06:46:46 AM
This is the web- Mandelbrot as a FOOP application, using a Complex class to do complex arithmetik.



Adapted for the web from a program by Michael and Cormullion:



http://newlisp.org/complex.cgi



Lutz



ps: also linked from the Tips & Tricks page
Title:
Post by: cormullion on February 03, 2008, 08:34:29 AM
Ah, I'd almost forgotten that! Actually, the story behind this is probably  interesting too:



//http://www.alh.net/newlisp/phpbb/viewtopic.php?t=1955
Title:
Post by: m i c h a e l on February 03, 2008, 10:16:00 AM
Hi Lutz!



Thank you for this practical demonstration of FOOP. Your code probably makes it easier for an experienced newLISPer to see how objects can be integrated into their existing way of programming. The videos, perhaps, focus too much on simulation.



Also, I like your use of the dotted notation in the naming of the Complex:mul locals:


(let (a.re (a 1) a.im (a 2) b.re (b 1) b.im (b 2))


Very nice.



m i c h a e l



P.S. Did they discover Noah's boat (again)? I keep hearing discussions about "Arc" ;-)