Cent/UCent as library types
Jonathan M Davis
jmdavisProg at gmx.com
Tue Jan 1 14:31:26 PST 2013
On Monday, December 31, 2012 20:24:42 Era Scarecrow wrote:
> On Monday, 31 December 2012 at 19:10:09 UTC, Jonathan M Davis
>
> wrote:
> > but I don't see what the point is of library types for them,
> > not when we already have BigInt.
>
> Fixed sizes means no GC/allocation for passing the data around
> to functions; And optimized assembly code. Beyond that, it
> doesn't seem highly important. But if it's around as a viable
> option people will begin using it.
>
> You never know when/where you could need it.
Given that we already have cent and ucent reserved specifically for 128-bit
integral types, I think that Cent and UCent only make sense if we have an
urgent use case that needs 128-bit integral types where BigInt won't work, and
we need a big reason not to just implement cent and ucent. Otherwise, why not
just implement cent and ucent? Long term, Cent and UCent just don't make
sense.
If someone wants to implement them for themselves, fine. But since the plan is
presumably to implement cent and ucent eventually, why put them in the
standard library where they've effectively given themselves an expiration date?
Especially when it's likely to be a rather niche need in the first place?
- Jonathan M Davis
More information about the Digitalmars-d
mailing list