+1 We built a distributed software sending/receiving *messages* based on different protocols.
All our protocols wrap data in an envelope. The receiver can then decide how to handle the message based on the envelope. Obviously, nil makes a bad envelope. A nil message on a channel never had any significance to us four years ago and rethinking about it we reach the same conclusion today :) Luc P. > On Tue, Aug 27, 2013 at 10:51 AM, Mike Anderson < > mike.r.anderson...@gmail.com> wrote: > > > To me it's all about consistency with other Clojure constructs. You can > > safely put nils in sequences, vectors, lists, sets etc.. nil is a valid > > "value" just like anything else. So why can't you put them in a channel? > > > > Channels are *not* data structures nor are they a "place" to put something. > > > > a) what if you want to send a sequence through a channel? Since nil as a > > value represents the empty sequence, you have to put in some extra special > > case handling with the current core.async model. > > > > You're not going to put random sequences into channels. Channels are > conduits for meaningful messages - some well considered coordination > protocol. > > > > Both of these, I think, are reasonable and common enough use cases that > > it's worth supporting them elegantly rather than forcing users to implement > > their own nil-wrapping functionality. > > > > If you're putting arbitrary sequences into a channel and need to wrap nils, > you probably need to redesign your coordination protocol. > > David > > -- > -- > 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. > -- Softaddicts<lprefonta...@softaddicts.ca> sent by ibisMail from my ipad! -- -- 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.