News for hackers. Stuff that matters.
Re:What I'd like to see in Go 2.0 by tapirl on Friday February 04, 2022 @11:23AM (#30208840)
Yes, as I have mentioned, there is performance loss, comparing to

    select {
       case: <-chan2_whichItreatTheSameAsChan3 // a higher priority
       case: 0xFF ->chan3_whichItreatTheSameAsChan2
    }
Re:What I'd like to see in Go 2.0 by usrbinbash on Friday February 04, 2022 @11:49AM (#30209231)
The real usecases where I need deterministic select, are so few that a small performance loss doesn't matter to me.
Re:What I'd like to see in Go 2.0 by tapirl on Friday February 04, 2022 @10:24PM (#30216833)
Sometimes, it is not related to performance loss, it is related to implementation cleanness and complexity.
Re:What I'd like to see in Go 2.0 by usrbinbash on Saturday February 05, 2022 @02:02AM (#30218569)
A separate `select` with empty `default` is about as simple and clean as it gets. It is easy to read, easy to reason about, and, most importantly, conveys the intention of the code perfectly.
Re:What I'd like to see in Go 2.0 by morelisp on Friday February 04, 2022 @01:14PM (#30210696)
1) Is there really a performance loss compared to if select was deterministic?

2) What in the world do you need such code for?

Re:What I'd like to see in Go 2.0 by tapirl on Friday February 04, 2022 @10:26PM (#30216853)
1) surely.

2) just read:

     https://groups.google.com/g/golang-nuts/c/SXsgdpRK-mE/m/CT7UjJ3aBAAJ

     https://groups.google.com/g/golang-nuts/c/ZrVIhHCrR9o

     https://groups.google.com/g/golang-nuts/c/lEKehHH7kZY/m/SRmCtXDZAAAJ