|
Message-ID: <20230531175628.168043d2@inria.fr>
Date: Wed, 31 May 2023 17:56:28 +0200
From: Jₑₙₛ Gustedt <jens.gustedt@...ia.fr>
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: [C23 128 bit 4/4] C23: implement proper support for
int128_t and uint128_t
Rich,
on Wed, 31 May 2023 11:40:43 -0400 you (Rich Felker <dalias@...c.org>)
wrote:
> On Wed, May 31, 2023 at 05:37:18PM +0200, Jₑₙₛ Gustedt wrote:
> > Rich,
> >
> > on Wed, 31 May 2023 11:14:06 -0400 you (Rich Felker
> > <dalias@...c.org>) wrote:
> >
> > > On Wed, May 31, 2023 at 05:07:00PM +0200, Jₑₙₛ Gustedt wrote:
> [...]
> [...]
> > > [...]
> > > [...]
> [...]
> > > [...]
> > > [...]
> > > [...]
> > > [...]
> [...]
> [...]
> > >
> > > OK, well this whole thread/topic then is a request/proposal for
> > > extended functionality, not part of C23 support, and needs to be
> > > considered as such.
> >
> > That's a stretch. It is an optional feature, we implement other
> > optional features. This a feature that the C standard describes and
> > that we are able to provide with relatively low effort.
> >
> > > I'm sorry there seems to have been a misunderstanding here. I'm
> > > trying to understand where you're coming from, and I think now
> > > you were probably looking at the intmax_t situation as if
> > > int128_t was something we wanted to offer, but couldn't because
> > > of ABI requirements. Whereas I was always looking at compounding
> > > library support for larger and larger types as an odious
> > > requirement that intmax_t helped us avoid.
> > >
> > > I *do* think there is demand for being able to compute with
> > > larger-than-int64 integer types, and this is a good thing, but
> > > it's a problem _BitInt solves entirely without imposing any heavy
> > > library requirements. I don't think "printing a 128 bit number in
> > > decimal" is very useful functionality. Hex, maybe, but then 256+
> > > is really what you would want (for key material etc).
> >
> > I don't think that that particular feature is very useful
> > functionality, we agree on that. It is just part of the catalogue
> > that is needed to claim proper 128 bit support.
>
> 128-bit support is not a feature we've ever claimed.
And I never said that.
> > Other features are probably more useful, such as checked arithmetic
> > and the bit operation interfaces. These also come with C23, but for
> > _BitInt types only if there is a fixed width type with the same
> > width.
> > > I'm sorry for sending you down a road of implementing this stuff
> > > in a way that'd be plausible for inclusion in musl based on a
> > > misunderstanding that it was a requirement for C23 support.
> >
> > This will come in other C libraries, anyhow. And this is not an
> > extension outside the standard. The standard clearly describes how
> > and when this has to be or can be done.
>
> Maybe it will, maybe not. musl is intentionally not on the bleeding
> edge of doing extensions.
Again, this is not an extension but an optional feature, and this has
nothing of bleeding edge. This is present in compilers since ages, and
everybody is using their specific ways to go around the restrictions
of previous C standards.
> We aim to support the things the standard guarantees to be present,
> and things which there is compelling existing support (by other
> implementations) and demand (by applications) for.
This is just a hen-and-egg problem. You will never see demand for
[u]int128_t if you do not provide the tools. Everybody will just raise
their eyebrows, swear on how dammed retarded they think the C
committee would be, and then do some workaround.
Jₑₙₛ
--
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.