Perhaps I need to read more of the Beginner's Guide first, but wouldn't 
(err error) be an inherent protection against variable number of "ghost" 
arguments (such as in python), if that is what this question is about?  
(But maybe it is only about formatting, I cannot be too sure, as again, I 
am unfamiliar with most of the language syntax.

On Friday, April 24, 2020 at 12:32:13 PM UTC-7, Scott Deerwester wrote:
>
> I greatly appreciate the fact that Go has a coding standard. I have a 
> modest proposed modification. Instead of this:
>
>     // Great is a really great function.
>     func Great(
>         anArg int, // This explains anArg
>         anotherArg string, // This explains anotherArg
>     ) (err error) {
>     ...
>
> I'd think that this:
>
>     // Great is a really great function.
>     func Great(
>         anArg      int,    // This explains anArg
>         anotherArg string, // This explains anotherArg
>     ) (err error) {
>     ...
>
>
> would be both clearer and more consistent with this:
>
>     var (
>         aVar       = 12          // This explains aVar
>         anotherVar = "something" // This explains anotherVar
>     )
>
>
> or this:
>
>     type SomeStruct struct {
>         FieldName string
>         Value     int
>     }
>
>
>     var aStructList = []*SomeStruct {
>         {
>             FieldName: "SomeName", // Comment for FieldName
>             Value:     12,         // Comment for Value
>         },
>     }
>
> which are already part of the standard coding style. Is this the right 
> place to make such a proposal?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2f96ba95-edb3-4f9b-801c-83cd05f6f907%40googlegroups.com.

Reply via email to