On Fri, May 22, 2015 at 6:24 AM, Nick Wellnhofer <[email protected]> wrote:

> There are
> many places where numbers are stored as JSON strings and the deserialization
> code supports both JSON string and numbers. Is this important or can I just
> assume JSON strings everywhere?

Historically, Lucy has not been been consistent about using one or the other,
so to change the code to require just strings could be fragile.  I think it
would be best to introduce utility functions (private to Lucy) which can
accept either a number type or a string type and return the appropriate
numeric primitive.

>> That leaves the following methods on Obj.
>>
>>      Destroy
>>      To_Host
>>      Clone
>>      Compare_To
>>      Equals
>
>
> and To_String.

Indeed.

Unlike To_I64, To_F64 and To_Bool, To_String isn't going anywhere in the short
term.  Maybe we'll debate whether it should be an interface method later.

Marvin Humphrey

Reply via email to