Specifically on "Arguments" under 
https://golang.org/ref/spec#Primary_expressions, I'm confused as to what 
purpose Type and [ "," ] have in the production.
If I am reading the section correctly,

    Arguments = "(" [ ( ExpressionList | Type [ "," ExpressionList ] ) [ 
"..." ] [ "," ] ] ")" .

refers to function calls. And intuitively, a function call can consist of 
zero or more Expressions delimited by commas, with the last argument 
optionally terminating with "...". However, the production for Arguments 
looks like it allows a function call to

   1. Optionally include a type as an argument
   2. Optionally end with a trailing comma

I understand that semantically these may not be allowed, but it doesn't 
make sense to me why they would be specified in the first place. This would 
be the production I would have thought of:

    Arguments = "(" [  ExpressionList  [ "..." ] ] ")" .

What does the production for Arguments syntactically permit? Also, if the 
production isn't just for a function call, what does it refer to? 

Thank You,
Akhil Indurti

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to