Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Pros: same as variation 2 above.

  • Cons:

    • Lose support for required args.

    • Call() handles non-zero-value defaulting, making explicitly passing zero-values difficult.

Overall conclusion

Variations 2-3 above have a lot of nice properties.

It goes a little against the principle of "letting things be what they are." If a thing exists solely to be called, shouldn't that thing be a function instead of a struct? At the same time, Go offers better flexibility for defining struct values than it does for argument lists.