OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Numbers] Re: [...] NUMBERS-68: parse() [...]


I would prefer to conform toString() to the current formats accepted by
parse() .

The toString() method separates the real and imaginary components by
commas. Separating numbers by commas strikes me as dangerous given that the
input expressions to be parsed may also contain commas within the numbers.
The format "x + yi" strikes me as satisfyingly unambiguous.

Eric



On Tue, Apr 24, 2018 at 3:38 PM, Gilles <gilles@xxxxxxxxxxxxxxxxxxxxx>
wrote:

> Hi.
>
> The contract indicates:[1]
> ---
> There must be a static factory method capable of creating an
> instance from the formal string representation. [...]
> ---
>
> Currently "toString" and "parse" do not match.
>
> Regards,
> Gilles
>
> [1] http://blog.joda.org/2014/03/valjos-value-java-objects.html
>
>