Why doesn't bdb-open create a new berkleydb object and return it on the stack?


I've been debating what the proper thing to do here is. That will help, but I'll still end up with calls where <bdb> floats to the bottom of the stack.

>r >r [ dbenv>> ] [ db>> ] bi r> r>

You can use 2dip here.


Ahhh.... That was one of those words I read about but it didn't click, thanks so much for pointing that out...

I'm working on a new compiler right now; in 11,000 lines of code, there are less than a dozen usages of rot, -rot and pick combined. Even swap only appears in 165 lines; so less than 1 in 50 lines of code needs a swap. This is because I try to ensure that everything is already in the right order on the stack.


Wow, that is really something. I have at least a dozen uses in one file :-) (and that's after factoring it down some). Will you be posting on approaches you've learned?

On a side note I have a question on the object system. Is it possible to override the accessor functions? That is could I do something like you can do in CLOS:

(defclass my-class ()
  ((a :documentation "a")))

(defgeneric (setf a) (a class))

(defmethod (setf a) (value (class my-class))
  (if (< a 10)
      (error  "bad value")
     (with-slots (a) my-class
       (setf a value))))

It looks like the >>a and a>> for a tuple would be automatically created and can't be hidden or overridden, is that true?

Thanks,

Glenn


V. Glenn Tarcea
[EMAIL PROTECTED]
Hey brother, can you paradigm?





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to