| 21:48 | <nicolo-ribaudo> | Tell WH that the spec is meant to contain accessors, it's an oversight if it doesn't contain them? |
| 22:01 | <nicolo-ribaudo> | If we do infinities, could we say that the fractional and significant digits always show up as 0? |
| 22:01 | <nicolo-ribaudo> | My main problem with infinities is that I don't know what precision means for them |
| 22:02 | <ljharb> | NaN, obv |
| 22:02 | <nicolo-ribaudo> | Maybe |
| 22:03 | <nicolo-ribaudo> | But we shouldn't round non-inifnities to infinity, you should only get infinity if you actually pass infinity in |
| 22:03 | <nicolo-ribaudo> | It seems like Kevin was unconvinced, but overall there was enough support that we would have gotten to stage 2 if we had time to think about infinity |
| 22:04 | <nicolo-ribaudo> | Happy that we settled when rounding happens |
| 22:05 | <sffc> | The infinity thing seems like a minor issue to hold up Stage 2 for resolving. I don't know if we had moved forward with the request for Stage 2 if more people than Kevin would have come out of the woodwork to share his concern. But, it seems that there was some additional explicit support in the Delegates channel, which is positive. |
| 22:07 | <sffc> | I see infinities and limits as tightly coupled. If you pass in a number over the limit, you get an infinite Amount. This is how ToIntlMV works. |
| 22:10 | <eemeli> | My initial sense is that Amount would be more valuable if it could guarantee its value to be finite. |
| 22:10 | <eemeli> | And that specifically supporting NaN would almost certainly be a mistake. |
| 22:10 | <sffc> | I'm surprised that Waldemar didn't seem to realize how ToIntlMV worked, because it was in NumberFormatV3 for which I think he was a reviewer. But it might have been a change we added relatively late in the process. |
| 22:12 | <sffc> | I don't think guaranteeing a finite value is any more valuable than, say, guaranteeing that the value has a unit, and we decided that it was okay for units to be a runtime thing, not part of the type signature. |
| 22:13 | <nicolo-ribaudo> | And that specifically supporting NaN would almost certainly be a mistake. |
| 22:14 | <eemeli> | In my own thinking, the Amount value is effectively the JSON number value. That doesn't work if it's not finite. |
| 22:15 | <eemeli> | Didn't think of that analogy before just now, otherwise I'd have included it in the presentation. |
| 22:15 | <Jesse> | my own preference is for finite values only, but we could consider infinities |
| 22:15 | <nicolo-ribaudo> | In my own thinking, the Amount value is effectively the JSON number value. That doesn't work if it's not finite. |
| 22:16 | <Jesse> | since we don't do arithmetic, and hence don't aim to align with IEEE 754, I don't see why we should include NaN or -0 |
| 22:17 | <eemeli> | JSON numbers are unquoted decimal strings. No infinities. |
| 22:17 | <Jesse> | if we settle on an unlimited range for finite values (at least in the spec), should we also have infinite values? |
| 22:18 | <nicolo-ribaudo> | We round Infinity to the smallest MV that when cast to a float gives infinity? :) |
| 22:21 | <eemeli> | On keep-trailing-zeros, I think we might still get 2.7 at this meeting, If Shane has time to review it? I understood Waldemar's blocking concern to have been identified as being beyond its scope. |
| 22:22 | <Jesse> | my understanding was that he either has a concern with Intl.NF as it exists today, or maybe a concern with the decimal spec text not updating Intl.NF |
| 22:23 | <sffc> | Yeah I didn't have it on my to-do list to review keep-trailing-zeros for 2.7 for some reason (I've been spending most of my time on intl-era-monthcode) but I'll get it in before tomorrow's meeting |
| 22:25 | <sffc> | eemeli, what is your proposed behavior when passing Infinity into the Amount constructor, in the world where Amount is for finite values only? |
| 22:26 | <eemeli> | From our current spec:
|
| 22:26 | <eemeli> | In the constructor, that is. |
| 22:27 | <sffc> | To voice support for supporting Infinity beyond Waldemar's concern, I think it's useful for Amount.from(0, "sec").convertUnit("Hz") to return a value and not throw an error |
| 22:27 | <Jesse> | feels odd to me to think about new Amouit(Infinity, { unit: "mile" }) |
| 22:28 | <eemeli> | (It's 1:30 am here, so I've poured myself a glass of rum, and am no longer braining at full power) |
| 22:28 | <sffc> | "infinite Hz" is a valid thing. It is a wave with a period of 0. It's useful in scientific applications |
| 22:28 | <Jesse> | do we want to emit โ[mile]? |
| 22:28 | <eemeli> | Infinity[mile] would match Number more closely. |
| 22:29 | <sffc> | My expectation would be either โ[mile] or Infinity[mile], no strong preference one way or the other |
| 22:30 | <sffc> |
|
| 22:30 | <Jesse> | ok, that's good precedent |
| 22:31 | <eemeli> | ... for .toLocaleString(). |
| 22:31 | <Jesse> | what about having an isFinite() method for amount? |
| 22:32 | <sffc> | I previously held the position that we should use Decimal as the numeric type and we swat down any complaints about the nature of the number by saying "it's just a Decimal". But I was under the understanding that we wanted to instead shift the mindset to "anything you can currently pass to Intl.NF.prototype.format, you should be able to put in an Amount". |
| 22:33 | <Jesse> | following that approach, we could support infinity (since decimal does) |
| 22:34 | <Jesse> | I might still opt for having unlimited range of finite values though |
| 22:34 | <Jesse> | (or at least find something that can fully contain decimal, number, and intl) |
| 22:34 | <sffc> | We have an explicitly "during Stage 2" issue to answer that question |
| 22:35 | <eemeli> | I think we a multiplicity of understandings about what Amount is and is meant to be. |
| 22:36 | <sffc> | Yes, but that's not a bad thing: it means it has many different use cases and people want it for different reasons |
| 22:37 | <Jesse> | agree -- I approached it thinking of finite values only but am happy to concede that infinity might actually arise (and is already supported by Intl.NF) |
| 22:37 | <Jesse> | it complicates the thinking, but just a little bit |
| 22:37 | <eemeli> | Yes, very much so. |
| 22:37 | <sffc> | I'd like to see a PR for making Amount support Infinity; Jesse could you make it? I wonder if we could get a timebox extension to discuss this. I think it would be productive. |
| 22:37 | <Jesse> | sure, I can make it |
| 22:38 | <Jesse> | my read of the room is that NaN should be banned, though? |
| 22:39 | <eemeli> | I think I'd like to see use cases for infinite amounts before considering a PR. Especially use cases within the context of the wider use cases. |
| 22:39 | <sffc> | Do you not buy my use case of "โ Hz" and "0 sec" round-tripping? |
| 22:40 | <Jesse> | looking ahead, is that something that proposal-smart-units should do? |
| 22:43 | <Jesse> | we also have our old bugbear -0 |
| 22:43 | <Jesse> | I'm interested in talking about infinity but much less interested in -0 and NaN |
| 22:45 | <Jesse> | atm I think we accept -0 as valid syntax but normalize it to 0 |
| 22:47 | <eemeli> | I think the round-tripping is beyond the scope; the relevant part here is that "โ Hz" makes sense as a thing to want to present. But if that's the only one you've got, that's a bit spoiled by Hertz not being a supported unit for Intl.NF. |
| 22:48 | <Jesse> | just noticing that hertz is listed in https://github.com/unicode-org/cldr/blob/main/common/supplemental/units.xml |
| 22:48 | <Jesse> | (I guess there are plenty of such units) |
| 23:06 | <sffc> | Made an issue for Infinity: https://github.com/tc39/proposal-measure/issues/50 |
| 23:07 | <Jesse> | I can PM a chair to ask for a continuation |
| 23:09 | <Jesse> | what do we want? 30 min? |
| 23:10 | <sffc> | And another issue for NaN and -0: https://github.com/tc39/proposal-measure/issues/51 |
| 23:11 | <eemeli> | I'm on my second glass of rum; not going to commit to anything, but not objecting to a continuation either. |
| 23:14 | <sffc> | I'd be amenable to a continuation if we can have a PR open for Infinity and can discuss it on the merits. |
| 23:14 | <sffc> | It seemed like Waldemar on Infinity and Kevin on Motivation were the only two concerns, yes? |
| 23:17 | <sffc> | But also it seems like the chairs want to end the meeting a day early and I don't want us as a champions group to come off as too pushy :) |
| 23:40 | <Jesse> | I asked for a continuation |
| 23:41 | <Jesse> | (but the continuation might not happen) |