Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(202)

Issue 3423041: code review 3423041: go spec: remove predeclared types float, complex in fav... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by gri
Modified:
14 years, 3 months ago
Reviewers:
CC:
golang-dev, rsc
Visibility:
Public.

Description

go spec: remove predeclared types 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 complx is renamed to complex.

Patch Set 1 #

Patch Set 2 : code review 3423041: go spec: remove predeclared types float, complex #

Patch Set 3 : code review 3423041: go spec: remove predeclared types float, complex #

Patch Set 4 : code review 3423041: go spec: remove predeclared types float, complex #

Patch Set 5 : code review 3423041: go spec: remove predeclared types float, complex in fav... #

Patch Set 6 : code review 3423041: go spec: remove predeclared types float, complex in fav... #

Patch Set 7 : code review 3423041: go spec: remove predeclared types float, complex in fav... #

Patch Set 8 : code review 3423041: go spec: remove predeclared types float, complex in fav... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+63 lines, -66 lines) Patch
M doc/go_spec.html View 1 2 3 4 5 6 33 chunks +63 lines, -66 lines 0 comments Download

Messages

Total messages: 9
r
LGTM
14 years, 3 months ago (2011-01-18 22:38:56 UTC) #1
gri
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 3 months ago (2011-01-18 22:57:24 UTC) #2
gri
We (the Go team) is planing to remove the predeclared types float and complex in ...
14 years, 3 months ago (2011-01-18 23:01:55 UTC) #3
rsc
i have a tree with almost all the changes made to keep things building. (it ...
14 years, 3 months ago (2011-01-18 23:41:50 UTC) #4
rsc
perhaps not for this CL, but deleting float and complex opens the possibility of spelling ...
14 years, 3 months ago (2011-01-19 01:21:40 UTC) #5
gri
Hello golang-dev@googlegroups.com, rsc (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 3 months ago (2011-01-19 02:44:08 UTC) #6
rsc
LGTM
14 years, 3 months ago (2011-01-19 03:57:58 UTC) #7
rsc
will clpatch and submit with the other float changes
14 years, 3 months ago (2011-01-20 03:07:52 UTC) #8
rsc
14 years, 3 months ago (2011-01-20 04:07:24 UTC) #9
*** Submitted as 03dec884e152 ***

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
http://codereview.appspot.com/3423041

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b