Re: es-discuss Digest, Vol 125, Issue 14

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: es-discuss Digest, Vol 125, Issue 14

Owen Swerkstrom
I was entirely unaware of Intl.NumberFormat("it-u-nu-roman")!  I don't
have a mac, and those examples don't seem to work in node or firefox
or chromium, but I'll take your word for it.

As for zero, for what it's worth, my implementation stringifies that
as an empty string, which parses as NaN.  Seemed the most sane given
my non-expertise.  I don't cap values; a number can have all the M's
it needs.  And yes, clearly fractions and negatives etc aren't
represented.

Does Intl do anything to parse string representations?  At first
glance it seems like a one-way interface for displaying stuff rather
than actually converting numbers.

"Just use a library" is a perfectly reasonable response.  I'm a C guy
at heart, so keeping a language itself free of frivolities feels
correct.  That said, the existing radix argument when parsing or
toString'ing a number gives us a little peek at a world of numbers
that goes beyond the base-10 Arabic digits we all use daily.
Expanding on it with some well-defined behaviors for handling other
representations of numbers doesn't seem like much of a stretch.


On 7/7/17, [hidden email]
<[hidden email]> wrote:

> Send es-discuss mailing list submissions to
> [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://mail.mozilla.org/listinfo/es-discuss
> or, via email, send a message with subject or body 'help' to
> [hidden email]
>
> You can reach the person managing the list at
> [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of es-discuss digest..."
>
_______________________________________________
es-discuss mailing list
[hidden email]
https://mail.mozilla.org/listinfo/es-discuss
Loading...