Hi,

On Mar 22, 7:13 am, Per Vognsen <per.vogn...@gmail.com> wrote:

> As a solution, I factored the reify out into a deftype:
>
> http://gist.github.com/339834

A short note: you don't have to use :keyword notation in the methods.
The attributes of the type are available under their names. See here:
http://paste.pocoo.org/show/192446.

> Unfortunately, the Promise deftype is no longer intercepted by the
> print-method for IDerefs. I guess it has to do with the deftype
> hierarchy vs Java hierarchy.

No. The "problem" is, that for each type there is a unique print-
method installed by deftype. You have to re-define this method and
call the method for clojure.lang.IDeref directly. (See also above
paste.)

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to