On Dec 12, 2:15 am, "Mark Engelberg" <[email protected]> wrote:
> If you wanted to extend deref to new types, is there any way to do
> that?  For example, deref of a delay could be equivalent to a force.
> Or deref of a Future could invoke the Future's get method.  This would
> give you the handy @ reader macro for things that frequently need to
> be forced to evaluate further in some way.

Right now you can do that by implementing clojure.lang.IRef.

It is implemented by refs/agents/var/atoms.

I need to refactor it to pull apart the validator stuff, at which
point there will be only get(), in a super-interface.

Delay used to implement IRef before validators, and will again after
this refactoring.

The semantics of Future.get() do not match IRef.get(), in that
Future.get() can block, so they should not be unified.

Rich

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to