From 9b49ac0366d3e3948adf5a30bfcff52049e1799a Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 22 Jan 2018 16:20:01 -0800 Subject: [PATCH] spec: consistently use "defined type" and "type name" (cleanup) When we introduced the notion of alias type declarations, we renamed "named type" to "defined type" to avoid confusion with types denoted by aliases and thus are also types with names, or "named types". Some of the old uses of "named types" remained; this change removes them. Now the spec consistently uses the terms: - "defined type" for a type declared via a type definition - "type name" for any name denoting an (alias or defined) type - "alias" for a type name declared in an alias declaration New prose is encouraged to avoid the term "named type" to counter- act further confusion. Fixes #23474. Change-Id: I5fb59f1208baf958da79cf51ed3eb1411cd18e03 Reviewed-on: https://go-review.googlesource.com/89115 Reviewed-by: Rob Pike --- doc/go_spec.html | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 1ada626bf0..33b66cb905 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -694,9 +694,8 @@ TypeLit = ArrayType | StructType | PointerType | FunctionType | InterfaceType

-Named instances of the boolean, numeric, and string types are -predeclared. -Other named types are introduced with type declarations. +The language predeclares certain type names. +Others are introduced with type declarations. Composite types—array, struct, pointer, function, interface, slice, map, and channel types—may be constructed using type literals. @@ -1025,8 +1024,8 @@ of a struct except that they cannot be used as field names in

-Given a struct type S and a type named T, -promoted methods are included in the method set of the struct as follows: +Given a struct type S and a defined type +T, promoted methods are included in the method set of the struct as follows: