ScalaVerbalExpressions icon indicating copy to clipboard operation
ScalaVerbalExpressions copied to clipboard

Slight API change

Open slior opened this issue 7 years ago • 0 comments

Hi, This suggest what i think can be an API improvement.

  1. The VerbalExpression case class becomes final - a simple "safety" best practice and shows the intention of this not being extended.
  2. The add method becomes private. I saw it used only internally, and figured it's not intended to be an API, since it basically kind of exposes implementation detail, and might be dangerous to expose as an API (it receives the string to concatenate). Note that it's still available for tests.
  3. The start and end of line - instead of having a single API method with boolean parameter - have more explicit methods that wrap those single method and provide a more explicit expression of the intent.

Let me know what you think.

slior avatar Aug 27 '18 17:08 slior