When re-reading the spec and discussing it with @evfirerob, it turned out that it's possible to reduce the code bloat required to maintain the Go API, by writing:
type Foo struct {
Bar string
rather than
type Foo struct {
bar string
}
func (foo *Foo) Bar() string {
return foo.bar
at the cost of having Go always automatically generating getters and setters for all public attributes, where often only a getter or a setter would be needed.
We should therefore amend the spec to use this option. The reason to do so is that it reduces the toil entailed by maintaining the API. It's also important to mention that we're writing a Go API that you can upgrade from C++ rather than a 100% compatible API.
When re-reading the spec and discussing it with @evfirerob, it turned out that it's possible to reduce the code bloat required to maintain the Go API, by writing:
rather than
at the cost of having Go always automatically generating getters and setters for all public attributes, where often only a getter or a setter would be needed.
We should therefore amend the spec to use this option. The reason to do so is that it reduces the toil entailed by maintaining the API. It's also important to mention that we're writing a Go API that you can upgrade from C++ rather than a 100% compatible API.