Publication date: 2018-04-19 23:30
Some have asked for a compiler option to turn those checks off or at least reduce them to warnings. Such an option has not been added, though, because compiler options should not affect the semantics of the language and because the Go compiler does not report warnings, only errors that prevent compilation.
"Go get" does not have any explicit concept of package versions. Versioning is a source of significant complexity, especially in large code bases, and we are unaware of any approach that works well at scale in a large enough variety of situations to be appropriate to force on all Go users. What "go get" and the larger Go toolchain do provide is isolation of packages with different import paths. For example, the standard library's html/template and text/template coexist even though both are "package template". This observation leads to some advice for package authors and package users.
In Go, the type system does not promote the argument of Equal that is the programmer's responsibility, as illustrated by the type T7 , which does implement Equaler :
Every language contains novel features and omits someone's favorite feature. Go was designed with an eye on felicity of programming, speed of compilation, orthogonality of concepts, and the need to support features such as concurrency and garbage collection. Your favorite feature may be missing because it doesn't fit, because it affects compilation speed or clarity of design, or because it would make the fundamental system model too difficult.
declares both to be pointers. This is clearer and more regular. Also, the := short declaration form argues that a full variable declaration should present the same order as := so
“Even a single dose of thalidomide, the active ingredient in Thalomid, can cause irreversible, debilitating birth defects if not properly handled and dispensed. Revlimid and Pomalyst are believed to have similar risks,” Geissman said.
There are two kinds of type parameters that can be used in F# programs. The first are generic type parameters of the kind described in the previous sections. This first kind of type parameter is equivalent to the generic type parameters that are used in languages such as Visual Basic and C#. Another kind of type parameter is specific to F# and is referred to as a statically resolved type parameter. For information about these constructs, see Statically Resolved Type Parameters.
For types such as basic types, slices, and small structs , a value receiver is very cheap so unless the semantics of the method requires a pointer, a value receiver is efficient and clear.
The article Go at Google discusses the background and motivation behind the design of the Go language, as well as providing more detail about many of the answers presented in this FAQ.