On Wednesday, 20 January 2021 at 10:39:48 UTC Carla Pfaff wrote:
> Also, until now, in Go identifiers beginning with a capital letter are
> exported.
>
Function parameters and local variables which start with a capital letter
are not exported.
I think it's a matter of taste whether you write
func foo(a int) {
b := a
...
}
or
func foo(A int) {
B := A
...
}
I prefer the former, but the latter is not forbidden. I can see that a
convention of initial caps for type parameters would help to distinguish
them visually.
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/f83b8e74-24f9-4f25-8a6e-dd55cebc2bb1n%40googlegroups.com.