What's a functor? Can you show me an example of how they are better in some way?
On Mon, 14 Feb 2005 09:24:59 +0530, david rush kumoyuki@gmail.com wrote:
On Thu, 10 Feb 2005 20:58:02 -0600, Eduardo Cavazos wayo.cavazos@gmail.com wrote:
Here is the reason that I'd like to stick with the procedural representation instead of using Gambit structures directly.
...
;; In an object system like the one I made it's much shorter:
Well, I used to think that way too. Believe me, you're on well-trodden ground here.
Anyway I switched to heavy use of functors because I got tired of having lots of
(let ((accessor (object accessor-keyword))) ..)
code and because functors have a much more flexible pattern of reuse. This has had the added advantage of allowing me to re-use native implementations of structures as in Gambit. In some Schemes (most notably Stalin, but this also applies to PLT), using native structures can result in significant speed-ups to your code. I am not sure if that is true in Gambit-4 or not.
david rush
DIsruptive Technology! _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca http://mailman.iro.umontreal.ca/mailman/listinfo/gambit-list