]> Cypherpunks repositories - gostls13.git/commit
spec: document that type inference doesn't apply to generic types
authorRobert Griesemer <gri@golang.org>
Mon, 7 Mar 2022 22:48:28 +0000 (14:48 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 8 Mar 2022 02:22:37 +0000 (02:22 +0000)
commit6e63be7b69aab25ac66029e7dfec47303d3b7505
treeff9a57d7711c066ff8e56ae9cd50bea280dde280
parent31be6285a879af94c7283e6599e3f9b64266bc1a
spec: document that type inference doesn't apply to generic types

Type inference for types was always a "nice to have" feature.
Given the under-appreciated complexity of making it work in all
cases, and the fact that we don't have a good understanding of
how it might affect readability of generic code, require explicit
type arguments for generic types.

This matches the current implementation.

Change-Id: Ie7ff6293d3fbea92ddc54c46285a4cabece7fe01
Reviewed-on: https://go-review.googlesource.com/c/go/+/390577
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
doc/go_spec.html