On Sun, Jun 30, 2013 at 4:46 PM, Brandon Bloom <brandon.d.bl...@gmail.com>wrote:
> > 2) It's somewhat annoying to always have to consider boolean false all the > time. Since nil signifies a closed channel, if, when, if-let, and when-let > are extremely convenient. Unfortunately, they are subtly bugged! You need > nil? checks everywhere, cluttering up relatively nice code. > > Since nil-as-closed also has the consequence that you can't send nil over channels, one way around this would be to uniformly give everything sent a wrapper indicating that there's something inside; on the receiving end, you could have a macro or function to test whether the received item was nil or wrapped and take one branch in the former case and transparently remove the wrapper and proceed with the inner value in the other branch in the latter. Er, and that relates to the beginning of the sentence because then you could also send nil over the channels, if you wanted to. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] -- -- 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/groups/opt_out.