Printing floating points
H. S. Teoh
hsteoh at quickfur.ath.cx
Wed Jan 27 11:40:37 UTC 2021
On Tue, Jan 26, 2021 at 11:16:58PM -0800, Walter Bright via Digitalmars-d wrote:
> On 1/26/2021 6:20 PM, Joseph Rushton Wakeling wrote:
> > On Wednesday, 27 January 2021 at 02:17:52 UTC, H. S. Teoh wrote:
> > > If there was a way to make these tables pay-as-you-go, I'd vote
> > > for it. Adding 104KB or 52KB even if the code never once formats a
> > > float, is not ideal, though granted, in this day and age of cheap,
> > > high-capacity RAM not really a big issue.
> >
> > Agree completely -- pay-as-you-go should be important for something
> > like this. (But then, it should be important for the whole
> > stdlib...)
>
> I've always thought things like this should be in the operating
> system. Get it right once, then everyone uses it.
Or get it wrong once, and everyone rolls their own, all slightly wrong
in a different way. :-D
> Date/time/DST should be in the OS, so should the ridiculously large
> amount of code to deal with the level 3 Unicode madness.
The next best thing is to reuse a reputable library that's reasonably
widespread, like libicu. But that adds an additional dependency, and
the API isn't always conducive to how the language works.
Reuse is hard.
T
--
VI = Visual Irritation
More information about the Digitalmars-d
mailing list