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){
...
Two arguments why this is not needed and would encourage bad coding
practice.
* If the names `anArg` and `anotherArg` don't reveal intention, they are
bad names. It should be encouraged to change them to intention revealing
names.
* The comment for the whole function should describe the meaning of the
parameters, if necessary. This comment is shown by IDEs, comments on
parameters are not. It should be encouraged to write complete function
comments.
Lutz
--
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/038916a0-65c7-9038-9a9b-96f0d718c8a7%40lhorn.de.