[go-nuts] Re: [generics] Use decorators ($, or @, or #) to specify that the type is a generic type.

2020-06-24 Thread haskell_mustard via golang-nuts
On Thursday, 25 June 2020 06:17:24 UTC+2, Andrey T. wrote: > 3. Ability to use decorated interface name as spec for type constrains > >func (type T Comparable) Max(a... T) (result T) {...} > >might become > >func Max(a... $Comparable) (result $Comparable) {...} > I don't see how th

[go-nuts] Re: [Generics] Concise generics with package level types

2020-06-23 Thread haskell_mustard via golang-nuts
Why not put type parameters on packages? https://go.googlesource.com/proposal/+/refs/heads/master/design/go2draft-type-parameters.md#why-not-put-type-parameters-on-packages -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this

[go-nuts] Re: RFC Package structuring

2020-02-29 Thread haskell_mustard via golang-nuts
1 go.{mod|sum} per repository, no vendoring tree/ angular-ui/ cmd/ hello-api-server/ hello-cli/ hello-daemon/ internal/ internal-lib1/ internal-lib2/ library1/ library2/ library3/ python-tests/ go.mod go.sum On Saturday, 29 February 2020 19:03:34 UTC+1, Sankar wrote: >

[go-nuts] Re: Error checking in Go: The `try` keyword

2020-02-06 Thread haskell_mustard via golang-nuts
The original, rejected proposal was better because it was a built-in, not a new keyword, so it didn't break existing tools. Otherwise I don't see a difference. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and s

Re: [go-nuts] Link: Getting specific about generics

2018-09-02 Thread haskell_mustard via golang-nuts
I prefer seeing the contract by example over having a combination of two dozens of interface names like Eq, Lesser, Adder, Muler, Convertible(x), Ranger, Lener, Caper, ... that have to be mentally mapped to their actual syntactic representation. This smells like taxonomy ("the lowest form of ac

[go-nuts] What's the status of the new Go brand?

2018-08-25 Thread haskell_mustard via golang-nuts
The announcement in April said: What’s happening next > > The website will be getting a refresh based on the new design. Since we > are making significant changes, we are also taking this opportunity to > update our website infrastructure to better serve our global community with > internati

[go-nuts] Re: Ternary ... again

2018-08-16 Thread haskell_mustard via golang-nuts
color := colorFor(temperature) func colorFor(temperature int) string { if temperature > 100 { return "red" } return "blue" } On Thursday, 16 August 2018 18:01:20 UTC+2, Haddock wrote: > > > var color >> if temperature > 100 { >> color = “red” >> } else { >> color = “blue” >> } >> >

[go-nuts] Re: Interface ????

2018-02-27 Thread haskell_mustard via golang-nuts
Because then you could do this: func PrintAll(vals []interface{}) { vals[0] = 123 } func main() { names := []string{"stanley", "david", "oscar"} var s string s = names[0] } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsu