]> Cypherpunks repositories - gostls13.git/commit
go spec: remove float, complex in favor of float64 and complex128
authorRobert Griesemer <gri@golang.org>
Thu, 20 Jan 2011 04:07:21 +0000 (23:07 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 20 Jan 2011 04:07:21 +0000 (23:07 -0500)
commitb94c0d2a774f6d35c3c4abf25af405dbe76825ee
tree9d6789ec834d077e9a5e2dcd2e4a1e6ce43b5377
parent50f384824eab5e94f3444ca0016f5eac7ea989f4
go spec: remove float, complex in favor of float64 and complex128

The default float type is not very useful but for the most basic applications.
For instance, as it is now, using the math package requires conversions for float
variables (the arguments for math functions are usually float64). Typical real
applications tend to specify the floating point precision required.

This proposal removes the predeclared types float and complex. Variable declarations
without type specification but with constant floating point or complex initializer
expressions will assume the type float64 or complex128 respectively.

The predeclared function cmplx is renamed to complex.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/3423041
doc/go_spec.html