a Functional Object Oriented Programming (FOOP) example

Started by Lutz, February 03, 2008, 06:46:46 AM

Previous topic - Next topic

Lutz

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">http://newlisp.org/complex.cgi



Lutz



ps: also linked from the Tips & Tricks page

cormullion

#1
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">//http://www.alh.net/newlisp/phpbb/viewtopic.php?t=1955

m i c h a e l

#2
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" ;-)