Viewing profile — ianlancetaylor
ianlancetaylor
HN member- Joined
- Fri, Jun 03, 2011, 1:12 PM UTC
- HN karma
- 182
- Public activity
- 40 items
- HN profile
- View on Hacker News ↗
About ianlancetaylor
No profile information was provided.
Recent public activity
-
comment
Comment #46398351
Rob Pike retired from Google a few years back.
-
comment
Comment #41240349
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) b…
-
comment
Comment #41239765
Yes.
-
comment
Comment #41239491
The default proxy has a privacy policy: https://sum.golang.org/privacy .
-
comment
Comment #37603740
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…
-
comment
Comment #37587715
Go made a deliberate decision to use multiple results rather than Option or Result . It's of course entirely reasonable to disagree with that decision, but it's not the case that t…
-
comment
Comment #37579098
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 langua…
-
comment
Comment #25767638
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 a…
-
comment
Comment #25754527
Very little. The announcement here is not a new draft, it is starting the formal proposal process for adding type parameters to the language.
-
comment
Comment #23545370
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 developm…
-
comment
Comment #18317827
Remember that they are only pinned to an old language version. They will still work fine with new release of Go, they will just be built with the old language semantics. So what's …
-
comment
Comment #18317811
Go could introduce a moving GC without requiring that map keys not be interface types. The simplest approach would be to use read barriers as we already use write barriers, and for…
-
comment
Comment #17870931
One step at a time. It's certainly a natural extension, and I don't think anything in the current design draft precludes it.
-
comment
Comment #17870923
Unfortunately [T] is also ambiguous with the current Go syntax. The parser can't distinguish an array declaration from a generic type.
-
comment
Comment #17870859
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 opera…
-
comment
Comment #17863758
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 suggesti…
-
comment
Comment #17863733
The blog post explains that.
-
comment
Comment #17862525
What is an "unmarked check call"?
-
comment
Comment #17862425
Yes, the various fmt.Print functions only return an error if Write on the underlying Writer returns an error.
-
comment
Comment #17862390
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.
-
comment
Comment #17862346
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 sto…
-
comment
Comment #17861660
That is not the only difference. Exceptions travel through calling functions if there is no catch clause. The check construct does not.
-
comment
Comment #17861592
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.
-
comment
Comment #17860483
Yes, what you write should work with the current draft.
-
comment
Comment #17860187
Read the design draft ( https://go.googlesource.com/proposal/+/master/design/go2draf... ). The issues you raise are addressed.