newLISP Fan Club

Forum => newLISP newS => Topic started by: cormullion on September 10, 2008, 10:39:38 AM

Title: Trying some FOOP programming: timeutilities.lsp
Post by: cormullion on September 10, 2008, 10:39:38 AM
I've been having a go at writing some FOOP-style functions, mainly as a training exercise, but also for use too, and I've put my first attempt at a module up at //http://unbalanced-parentheses.nfshost.com/downloads/index.html.



It's a bit rough at present (nowhere near as polished as Jeff's newLISP modules...) so I'd appreciate any suggestions or criticisms, either here or by pm/email...



thanks!
Title:
Post by: Lutz on September 10, 2008, 12:00:46 PM
very nice, I will put a link here: http://www.newlisp.org/modules/
Title:
Post by: cormullion on September 10, 2008, 12:10:40 PM
thanks!
Title:
Post by: m i c h a e l on September 11, 2008, 08:32:32 AM
Hi cormullion!



Great job on your Time and Duration modules. You're really getting the hang of this FOOP thing.



I'm impressed with the number of useful methods you've managed to include (:period and :shift, for example), and your constructor is so versatile, allowing for many ways to create a Time object.



This is a perfect example of practical FOOP. Well-done.



m i c h a e l
Title:
Post by: cormullion on September 11, 2008, 09:23:35 AM
Cool - thanks!



The immutable objects principle seems a happy fit for this particular application. I find it harder to think about objects for more abstract applications, where you just want to change the objects, not make modified copies...