Hey all,

I'm having some pain with atoms and dereferencing nil - mostly around my 
functions sometimes returning an atom and other times nil - I don't really 
want to create a special 'nil' atom and do the bits for returning that and 
I don't want to be checking nils absolutely everywhere when nil-punning 
works perfectly otherwise, so I was wondering what the pitfalls of this 
approach would be?

(extend-type nil IDeref
  (-deref [_] nil))

Effectively, make @nil nil-pun to nil. makes sense to me?

Cheers,
 - Deon

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to