Re: [heycam/webidl] Add bigint type (#525)

> I'd say, call the numeric overload over the bigint one

Why?  The bigint conversion is the less lossy one in this case, I would think.

> which would also call the numeric overload over the boolean one given a string argument?

It would, yes.  Arguably conversion to numeric is less lossy than conversion to boolean.

More generally, it seems we're going out of our way to provide seamless conversions from strings (but not other primitives!) to bigints.  This is in contrast to numeric and boolean types, which can be converted from all primitives.  So in some sense, there is some sort of privileged relationship between bigint and strings that is not shared by other primitive values in JS or other primitive-like idl types...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/525#issuecomment-368971485

Received on Tuesday, 27 February 2018 18:08:10 UTC