score:2

There is no benefit except for some confusion and that you can use the JsPath object as empty JsPath. If you need an empty object, it is probably more readable if you give it a separate name (equivalent to List's Nil):

object EmptyJsPath extends JsPath(Nil)

or you define a empty method on the companion (like most other collection classes do):

object JsPath {
  def empty = ...
}

Related Query

More Query from same tag