mirror of
https://github.com/golang/go.git
synced 2025-05-07 16:43:03 +00:00
Updated Go2GenericsFeedback (markdown)
parent
735eb2b5a2
commit
b7883c32e8
@ -127,8 +127,8 @@ To make it easier to see new feedback. Please *make a Gist*. And also help to ke
|
|||||||
|
|
||||||
- yesuu: In this example, think of `T` as the parameter name and `type` as the parameter type. Obviously it is more reasonable to put the `type` behind, and contract is followed by `type`, like `chan int`.
|
- yesuu: In this example, think of `T` as the parameter name and `type` as the parameter type. Obviously it is more reasonable to put the `type` behind, and contract is followed by `type`, like `chan int`.
|
||||||
|
|
||||||
```
|
```go
|
||||||
func Sum<T type Addable>(x []T) T
|
func Sum(T type Addable)(x []T) T
|
||||||
```
|
```
|
||||||
|
|
||||||
- Roberto Clapis: Please read [this section](https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md#why-not-use-like-c_and-java)
|
- Roberto Clapis: Please read [this section](https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md#why-not-use-like-c_and-java)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user