On Sun, 2025-08-17 at 05:36 -0700, Ruslan Semagin wrote:
> `ch <- xs...` is a similar case: the semantics are well-defined
> (element-wise dispatch with the usual channel behavior of
> blocking/closing), backwards compatible, and optional. Those who
> prefer an explicit loop can continue to write it, while others can
> use a more concise form that does not introduce ambiguity.
> 
> In the comments on GitHub, it was also noted that it would be
> possible to support `ch <- 1, 2, 3` (link)

Having the send expressible like this would allow it to be included in
a select. This has significant semantic complications. What is the
behaviour of select {; case ch <- 1, 2:; default: }? Does is require
that all sends succeed? What happens if it gets through n-1 of the
sends and the last one blocks?

This semantic difference is deeper than the subtleties of variadic
argument passing, which are really only implementation details.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/17fd8da7a159e991ae29e12d1561371c93c472ae.camel%40kortschak.io.

Reply via email to