Re: [go-nuts] Restrict general type parameter identifiers to be a single uppercase ascii letter.

2021-01-20 Thread Jérôme Champion
A bit out of subject but the naming with generics has always bothered me. It's more of an general observation and don't have a solution for it. I think we all agree that naming types and variables is important. Why for generics we accept that naming them E, K P, T etc.. is good and sufficient? I

[go-nuts] Re: proposal: disallow implicitly comparing true with value of interface{} in a switch with no value

2018-04-22 Thread Jérôme Champion
The syntax is correct: https://play.golang.org/p/t5Oi8vyCsbw I don't think comparing an interface to a boolean in a switch is very common. It would need some strong evidence to justify adding an exception to the rule. Le dimanche 22 avril 2018 02:53:14 UTC+2, Louki Sumirniy a écrit : > > Your

[go-nuts] Re: Would this race condition be considered a bug?

2018-03-16 Thread Jérôme Champion
Any race is a bug. When there is a race, the compiler is free to do whatever it wants. What do you want to do? Do you want to println before or after cancelContext? In your example, println could even be executed during cancelContext! Your example is not enough, such program :

Re: [go-nuts] Re: Go Compiler How Work?!

2017-12-13 Thread Jérôme Champion
I think it would be better if you explain what you want to do. As example : "I want to compile a go program on a ppc64 architecture with operating system XY version Z." Le mercredi 13 décembre 2017 12:30:53 UTC+1, erfang...@gmail.com a écrit : > > ?!! how may be? > a software , for this then

Re: [go-nuts] sort.Slice arguments

2017-03-08 Thread Jérôme Champion
As itinerary and the reslicing operation use the same backing array, you could just offset your indexes: https://play.golang.org/p/2ZzKST5J1g I'm not sure if it's a good idea, could the sort.Slice implementation change in the future and make a regression? Le mercredi 8 mars 2017 18:22:48