I think the point is that by implementing Getter/Setter methods, which are
trivially inline-able there's no real downside to skipping fields and just
allowing method calls.
If it makes it easier to unify contracts and interfaces, I think that may
be a hit worth taking (though I still say, getters and setters are terribly
idiomatic, and have been actively discouraged in the past. This will make
them far more common, I'm not really sure that's a good thing.

On Wed, 12 Sep 2018 at 14:15 Mandolyte <cecil....@gmail.com> wrote:

> On field accessors...
>
> - Algorithms for X,Y points requiring them to be members of a struct type.
>
> - Algorithms to manipulate colors, requiring R,G, and B to be members.
>
> In an image processing library with its own rich set of struct types, such
> accessors would prove productive.
>
> Are these the kind of examples you meant?
>
> --
> 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.
>

-- 
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