Wendy, Piotr, It makes sense to me for ranking to be integers. Using your example of 10,11,100, only comparisons make sense. Hence, if we want "minimal" field, it will be non-negative integers. Although a dynamic typed language allow a var to be int or float, a reasonable runtime will try to distinguish, as floating point ops can be a lot more expensive than int ops.
I do agree that int or float is not essential. The key idea behind ordinal is to allow networks a tool to reveal minimal information, as the good example of 10,11, and 100 has shown. Can you please take a look at the idea of allowing generic cost-mode. We can have ordinal-float then :-) Richard On Tuesday, October 27, 2015, Piotr Wydrych <[email protected]> wrote: > Hello Wendy, > > W dniu 2015-10-27 o 19:37, Wendy Roome pisze: > >> Note that JSON does not distinguish between integers and floating point, >> and in the JSON libraries I've seen, numbers are always floating point. >> When parsing JSON, libraries do not distinguish between 1 and 1.0. When >> generating JSON, most libraries will generate 1, but a library could >> generate 1.0. >> > > Indeed, it may be an important issue in some specific use-cases. AFAIR if > you have a Long field and (de)serialize it in Jackson (most popular Java > JSON library), everything will work properly as data types are perfectly > known. But if you switch to JavaScript, where all numbers are > double-precision fp by definition, you won't be able to store an exact > value lying outside the range [-(2^53)+1, (2^53)-1]. > > And as you've stated, a library may (non-intentionally) produce a map not > conforming to JSON schema by generating `integers' like 1.0 or 1e2. (JSON > schema differentiates "integer" and "number".) Such a map should be > droppped by a client on validation or deserialization stages. > > Best regards, > Piotr 'GhosT' Wydrych > -- > Piotr 'GhosT' Wydrych .. xmpp:wydrych//agh.edu.pl .. > https://urldefense.proofpoint.com/v2/url?u=http-3A__wydrych.net_&d=AwICAg&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=4G36iiEVb2m_v-0RnP2gx9KZJjYQgfvrOCE3789JGIA&m=DBw3LMYBZ3XvlHDexgPNVI93O2ALSfgTYNV1bOKFwv4&s=exzvHz7PjkJfxTQ0VeP5av8f4Vf9OMjuS-ySttvVIlQ&e= > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing? > > _______________________________________________ > alto mailing list > [email protected] > > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_alto&d=AwICAg&c=-dg2m7zWuuDZ0MUcV7Sdqw&r=4G36iiEVb2m_v-0RnP2gx9KZJjYQgfvrOCE3789JGIA&m=DBw3LMYBZ3XvlHDexgPNVI93O2ALSfgTYNV1bOKFwv4&s=DDWVYo7-WDUHlD9JIdHzeymbcN7tNtVSBoSnInjXCLU&e= -- Richard
_______________________________________________ alto mailing list [email protected] https://www.ietf.org/mailman/listinfo/alto
