3 ms·
Note that in some ways core.async is a bit more flexible than Go - for example you can dynamically select over a changing list of channels. I've found this to b
by swannodette 13y ago
Note that in some ways core.async is a bit more flexible than Go - for example you can dynamically select over a changing list of channels. I've found this to be really handy especially when you're receiving channels on channels.
you can do everything in an FRP style if you like with core.async, it's flexible enough for that. But I think for less toy examples this is undesirable as you allude.
- mseepgood 13y ago> Note that in some ways core.async is a bit more flexible than Go - for example you can dynamically select over a changing list of channels http://golang.org/pkg/reflect/#Select http://golang.org/pkg/reflect/#Select
- swannodette 13y agoYou should look a bit more closely at what I said :) EDIT: Oops, I didn't see you had linked to the reflect features. I did not know that and that is very cool.
- mseepgood 13y agoYou said: "for example you can dynamically select over a changing list of channels" reflect.Select does exactly that.
- jzelinskie 13y agoGo has a trick where you can set a channel to nil in order to get its functionality ignored in your select. If you gave the select all the possible channels and turned them on and off rather than adding/removing channels you can obtain similar functionality.
- swannodette 13y agoYes you need to know all the channels ahead of time, this restriction simply doesn't exist in core.async.