Problem is, there isn't a "one size fits all" and channels have
drawbacks, so whereas you may be satisfied with channels, others may
want different synchronised ways to access the return values.
One could, for example, have a return "type" and a single channel of
that type, then one may want the type to be returned as a single value
instead of in a channel, in which case one may want to use a Mutex for
synchronisation. Or one may not want to block: is it going to be a
buffered or unbuffered channel?
My recent thoughts have been rather around a "Go" method that is
implemented along the lines you presented. That took me on a
galaxy-wide quest: why not have "If" or "Switch" or even "Func"
methods?
It's a curious language, Go is, if you scratch the surface a bit.
Lucio.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
golang-dev+...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
>
--
Lucio De Re
2 Piet Retief St
Kestell (Eastern Free State)
9860 South Africa
Ph.:
+27 58 653 1433
Cell:
+27 83 251 5824
FAX:
+27 58 653 1435