18:32
<nicolo-ribaudo>
Do you think it would it be backward compatible for Intl to check if the argument to .format() has a .significantDigits/.unit property, rather just checking for the internal slot?
18:32
<nicolo-ribaudo>
For some delegates it's important to try to not check internal slots other than on the this argument, so that the feature does not break with membranes
18:36
<ljharb>
while i agree with their motivations i think it's reasonable for static methods to check slots on arguments, altho no precedent has been set
18:55
<littledan>
yeah, I think this would make plenty of sense -- maybe we could do it in https://tc39.es/ecma402/2024/#sec-tointlmathematicalvalue for the case ToPrimitive would've thrown an error from no method existing
20:43
<eemeli>

If we have .format() check for properties, then what's the decimal-proposal need for something like Decimal.Amount to exist at all? Could a Decimal.p.toAmount() return something like

{ valueOf: () => 42, significantDigits: 3 }
22:45
<sffc>
eemeli: An intrinsic gives us immutability, ability to attach methods such as toString and toLocaleString, constructors, brand checking. I don't see why not to return an intrinsic from that method.