Fork me on GitHub
#core-async
<
2017-03-06
>
jstew16:03:16

Quick question: In the API docs, we are told not to put nil values on a channel. Is this only because take from a closed channel returns nil, or for some other technical reason? I have searched around and haven't found an answer, but I just assume that because nil on a take means closed channel.

bronsa16:03:57

that's the reason

bronsa16:03:40

it'll throw an exception if you try to anyway

jstew16:03:47

great, thanks!

ghadi19:03:11

also semantically what's the meaning of sending nil

ghadi19:03:19

there's no point IMHO

ghadi19:03:19

(similarly in datomic you can't store nil as a fact)

nooga19:03:35

> It'll probably be awhile before I hear back from Rich, and I'm 90% sure the answer is "don't do that"

joshjones21:03:45

@ghadi Since we can store nil in data structures, I can see why some people might want to use it.

ghadi22:03:16

this isn't a data structure, this is communication between processes

tbaldridge22:03:14

Hey @ghadi...I got a message for you

tbaldridge22:03:31

that makes about as much sense as a nil on a channel 😉

ghadi22:03:50

it's communicating nothing to me