Proposals that employ the type keyword, look more Go-ish. Go is already
doing many things differently than other PLs in C-ish family - the if
without parentheses and no semicolon are two of things that hit most when
switching frequently between Go and another PL.
func SomeContext() {
var aSlice [](typeㅤ T)
var aMap map[typeㅤ T](type ㅤU)
var aChannel <-chan (typeㅤ T)
aSlice = make([]int, 0)
aMap = make(map[int]int)
aChannel = make(chan int)
otherStuff(aSlice, aMap, aChannel)
}
func Action(x typeㅤ T, y, delta type ㅤU) (xres type ㅤT, yres type ㅤU) {
return
}
type Data struct {
typeㅤ T
type ㅤU
Input T
Output U
}
type Processor interface {
Process(typeㅤ T) (Data {type ㅤT = T, typeㅤ U = string}, error)
}
type Actual struct {
type ㅤR
}
func (Actual) Process(input typeㅤ T = R) (Data{typeㅤ T = T, type ㅤU =
string}, error) {
return Data { input, "" }
}
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/12cfbc30-4be2-47fe-a640-b8a1ffbedec2n%40googlegroups.com.