Re: [RFC] Preserve Fractional Part in JSON encode

From: Date: Mon, 05 Jan 2015 04:18:28 +0000
Subject: Re: [RFC] Preserve Fractional Part in JSON encode
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-80169@lists.php.net to get a copy of this message
Hi, Everyone has any concern on the constant name as Andrea mentioned? Should we keep or rename it? If this name is fine and there is no other concerns probably in 3 days (when completes 2 weeks) this RFC can be moved to voting, right? Thanks, Juan Basso On Thu, Dec 25, 2014 at 9:17 PM, Juan Basso <jrbasso@gmail.com> wrote: > Andrea, > > I am not a specialist in float numbers, but I think integral float numbers > have a fractional part with value 0. > > JSON_FLOAT_ADD_POINT_ZERO can be confuse for regular floats with non-zero > as fractional part. Seems you are going to add a point zero in a regular > float with point something. > > Anyway, I am open to rename the constant to make it clear for everyone. I > just can't find a better name than that. By the way, this name was proposed > by Kevin Israel (plstand) on the PR. > > On Thu, Dec 25, 2014 at 9:01 PM, Andrea Faulds <ajf@ajf.me> wrote: > >> >> > On 25 Dec 2014, at 19:32, Juan Basso <jrbasso@gmail.com> wrote: >> > >> > The RFC can be found here: >> > https://wiki.php.net/rfc/json_preserve_fractional_part >> >> Hey Juan, >> >> A further thought: is “Preserve Fractional Part” the best name? Integral >> floats like float(12) don’t have any fractional part, and besides, the name >> doesn’t tell you what it does IMO. Perhaps something like >> JSON_FLOAT_ADD_POINT_ZERO? It’s more literal and, I think, more obvious. >> >> Thanks. >> >> -- >> Andrea Faulds >> http://ajf.me/ >> >> >> >> >> >

« previous php.internals (#80169) next »