go-mls icon indicating copy to clipboard operation
go-mls copied to clipboard

Consistent public / private API

Open bifurcation opened this issue 5 years ago • 0 comments

The current API is an uncomfortable mix of private (lower case) and public (upper case) APIs. "Uncomfortable" because, for example, there are public functions and struct fields that use private types.

We should follow some consistent theory about what is public and private. The two obvious alternatives:

  1. Everything is public
  • Pro: Allows for lower-level experimentation
  • Con: Makes it harder for consumers to understand what APIs they should use
  1. Only a "blessed" API is public; everything else is private
  • Pro: Easier for consumers to use
  • Con: Requires careful thought about what goes into the blessed API

bifurcation avatar Dec 31 '19 22:12 bifurcation