Rob Pike retired from Google a few years back.
You can use it with other functions that use iterators. For example, here is code that makes a copy of a map keeping only the even keys. maps.Collect(xiter.Filter2(func(k, v int) bool { return k%2 == 0 }, maps.All(m)))
Yes.
The default proxy has a privacy policy: https://sum.golang.org/privacy.
I'm not going to claim that Go has the ideal approach to whether an error can be ignored. In general, in Go, some errors can be ignored, and some can't. For example, fmt.Fprintf to a strings.Builder can never result a…
Go made a deliberate decision to use multiple results rather than Option<T> or Result<S, E>. It's of course entirely reasonable to disagree with that decision, but it's not the case that the Go language designers were…
As it happens, we considered sum types quite seriously in the early days. In the end we decided that they were too similar to interface types, and that it would not help the language to have two concepts that were very…
There is no ambiguity there. The ambiguity arises for parameterized types. type A[T] int Is that a parameterized type named A with a type parameter T, or is it a definition of an array named A whose length is T?…
Very little. The announcement here is not a new draft, it is starting the formal proposal process for adding type parameters to the language.
There isn't a code review for the changes on the dev.go2go branch (though you could construct one using git diff). The dev.go2go branch will not be merged into the main Go development tree. The branch exists mainly to…
One step at a time. It's certainly a natural extension, and I don't think anything in the current design draft precludes it.
Unfortunately [T] is also ambiguous with the current Go syntax. The parser can't distinguish an array declaration from a generic type.
Thanks for the comments. We tried for some time to declare contracts like interfaces, but there are a lot of operations in Go that can not be expressed in interfaces, such as operators, use in the range statement, etc.…
In this case the mismatch is between a type argument and the way that a type parameter is used, so it's not a type mismatch/error, it's a meta-type mismatch error. You are suggesting that the meta-type be inferred from…
The blog post explains that.
What is an "unmarked check call"?
Yes, the various fmt.Print functions only return an error if Write on the underlying Writer returns an error.
And then the caller has to either check or ignore the error. The error never propagates to the caller's caller without an explicit action in the caller. That is unlike exceptions.
I don't think there is any lack of clarity about your List example; that is clearly forbidden. The example that is less clear is the one that generates a million types and then stops. A similar issue arises in C++; the…
That is not the only difference. Exceptions travel through calling functions if there is no catch clause. The check construct does not.
A year ago we said it was time to move toward Go 2: https://blog.golang.org/toward-go2 . This is another step in that direction.
Yes, what you write should work with the current draft.
Read the design draft (https://go.googlesource.com/proposal/+/master/design/go2draf...). The issues you raise are addressed.
The mysterious "plugin" package does not yet exist, and won't be in the 1.5 release. I would encourage you to try to implement it and send in the changes. The ideas in the execution modes doc are being steadily filled…
The fact that it's not necessary to explicitly state which interfaces are implemented by a type is a key design decision in Go. It's not going to change. Every language decision has pluses and minuses. I think most Go…
Rob Pike retired from Google a few years back.
You can use it with other functions that use iterators. For example, here is code that makes a copy of a map keeping only the even keys. maps.Collect(xiter.Filter2(func(k, v int) bool { return k%2 == 0 }, maps.All(m)))
Yes.
The default proxy has a privacy policy: https://sum.golang.org/privacy.
I'm not going to claim that Go has the ideal approach to whether an error can be ignored. In general, in Go, some errors can be ignored, and some can't. For example, fmt.Fprintf to a strings.Builder can never result a…
Go made a deliberate decision to use multiple results rather than Option<T> or Result<S, E>. It's of course entirely reasonable to disagree with that decision, but it's not the case that the Go language designers were…
As it happens, we considered sum types quite seriously in the early days. In the end we decided that they were too similar to interface types, and that it would not help the language to have two concepts that were very…
There is no ambiguity there. The ambiguity arises for parameterized types. type A[T] int Is that a parameterized type named A with a type parameter T, or is it a definition of an array named A whose length is T?…
Very little. The announcement here is not a new draft, it is starting the formal proposal process for adding type parameters to the language.
There isn't a code review for the changes on the dev.go2go branch (though you could construct one using git diff). The dev.go2go branch will not be merged into the main Go development tree. The branch exists mainly to…
One step at a time. It's certainly a natural extension, and I don't think anything in the current design draft precludes it.
Unfortunately [T] is also ambiguous with the current Go syntax. The parser can't distinguish an array declaration from a generic type.
Thanks for the comments. We tried for some time to declare contracts like interfaces, but there are a lot of operations in Go that can not be expressed in interfaces, such as operators, use in the range statement, etc.…
In this case the mismatch is between a type argument and the way that a type parameter is used, so it's not a type mismatch/error, it's a meta-type mismatch error. You are suggesting that the meta-type be inferred from…
The blog post explains that.
What is an "unmarked check call"?
Yes, the various fmt.Print functions only return an error if Write on the underlying Writer returns an error.
And then the caller has to either check or ignore the error. The error never propagates to the caller's caller without an explicit action in the caller. That is unlike exceptions.
I don't think there is any lack of clarity about your List example; that is clearly forbidden. The example that is less clear is the one that generates a million types and then stops. A similar issue arises in C++; the…
That is not the only difference. Exceptions travel through calling functions if there is no catch clause. The check construct does not.
A year ago we said it was time to move toward Go 2: https://blog.golang.org/toward-go2 . This is another step in that direction.
Yes, what you write should work with the current draft.
Read the design draft (https://go.googlesource.com/proposal/+/master/design/go2draf...). The issues you raise are addressed.
The mysterious "plugin" package does not yet exist, and won't be in the 1.5 release. I would encourage you to try to implement it and send in the changes. The ideas in the execution modes doc are being steadily filled…
The fact that it's not necessary to explicitly state which interfaces are implemented by a type is a key design decision in Go. It's not going to change. Every language decision has pluses and minuses. I think most Go…