nl_tokens: The type . parse () method returns a Conversion to inform the user about not only the result of a Conversion but also about what went wrong . We could use an exception and throw if the conversion failed but that seems to violate the idea that exceptions should be exceptional . Typos are not . Also in order to store both a status and a message we d still need some sort of exception type ...
pl_tokens: function Conversion ( value , <mask> , message , predictions ) { /**
       * The result of the conversion process. Will be null if status != VALID
       */ this . value = value ; /**
       * The status of the conversion.
       * @see Status
       */ this . status = status || Status . VALID ; /**
       * A message to go with the conversion. This could be present for any status
       * including VALID in the case where we want to note a warning for example.
       * I18N: On the one hand this nasty and un-internationalized, however with
       * a command line it is hard to know where to start.
       */ this . message = message ; /**
       * A array of strings which are the systems best guess at better inputs than
       * the one presented.
       * We generally expect there to be about 7 predictions (to match human list
       * comprehension ability) however it is valid to provide up to about 20,
       * or less. It is the job of the predictor to decide a smart cut-off.
       * For example if there are 4 very good matches and 4 very poor ones,
       * probably only the 4 very good matches should be presented.
       */ this . predictions = predictions || [ ] ; }