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

Issue 160570043: code review 160570043: spec: permit parentheses around builtin function names (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 5 months ago by gri
Modified:
9 years, 5 months ago
Reviewers:
r, gobot, rsc, iant
CC:
r, rsc, iant, ken2, dfc, golang-codereviews
Visibility:
Public.

Description

spec: permit parentheses around builtin function names Not a language change. This is simply documenting the status quo which permits builtin function names to be parenthesized in calls; e.g., both len(s) and (((len)))(s) are accepted by all compilers and go/types. Changed the grammar by merging the details of BuiltinCall with ordinary Calls. Also renamed the Call production to Arguments which more clearly identifies that part of the grammar and also matches better with its counterpart on the declaration side (Parameters). The fact that the first argument can be a type (for builtins) or cannot be a type (for regular function calls) is expressed in the prose, no need to make the grammar more complicated. Fixes issue 9001.

Patch Set 1 #

Patch Set 2 : diff -r 3d68989bd1ea4f9d3cc7b37433522e7d3255a280 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 3d68989bd1ea4f9d3cc7b37433522e7d3255a280 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 849dcf4fd495eaaa55828e9d136cab7979dc1bef https://code.google.com/p/go/ #

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

Messages

Total messages: 8
gri
Hello r@golang.org, rsc@golang.org, iant@golang.org, ken@golang.org (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to ...
9 years, 5 months ago (2014-10-27 21:35:23 UTC) #1
iant
LGTM
9 years, 5 months ago (2014-10-27 22:12:01 UTC) #2
r
LGTM
9 years, 5 months ago (2014-10-27 22:47:43 UTC) #3
rsc
LGTM
9 years, 5 months ago (2014-10-27 22:51:47 UTC) #4
dfc
Curiously gofmt is able to remove some, but not all of the parenthesis in the ...
9 years, 5 months ago (2014-10-27 22:53:31 UTC) #5
gri
Yes, it's not smart enough - it just the easy ones where no precedence or ...
9 years, 5 months ago (2014-10-27 23:29:11 UTC) #6
gri
*** Submitted as https://code.google.com/p/go/source/detail?r=c283a21e89c5 *** spec: permit parentheses around builtin function names Not a language ...
9 years, 5 months ago (2014-10-27 23:31:17 UTC) #7
gobot
9 years, 5 months ago (2014-10-27 23:49:14 UTC) #8
Message was sent while issue was closed.
This CL appears to have broken the linux-amd64-race builder.
See http://build.golang.org/log/c18793d061ebdbe0fe646ea5a4d9cf6e39207487
Sign in to reply to this message.

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