Date: Sat, 30 Aug 2025 18:53:35 +0000
> What is gained? Portability! It would mean your code does not stop working some time in the future just because the underlying hardware changes.
What? How?
The "underlying hardware" doesn't just change, you have to port the code over to a new architecture.
Ensuring that your code is portable is achieved by migrating from double to float64_t.
Aliasing float64_t to double when they have the same representation does not impact portability.
If you move the code to a new platform where double has a different implementation, the only thing that would mean is that float64_t wouldn't be an alias of double of that platform.
What does impact is the ability to adopt the new type, and code bloat because now symbols are duplicated.
Because for no good reason, something that walks like a duck, quacks like a duck, and looks like a duck, was made not a duck.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Simon Schröder via Std-Proposals <std-proposals_at_[hidden]>
Sent: Saturday, August 30, 2025 1:42:09 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Simon Schröder <dr.simon.schroeder_at_[hidden]>; std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Subject: Re: [std-proposals] TBAA and extended floating-point types
On Aug 26, 2025, at 10:55 PM, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
I can understand some general reasons for the push-back on allowing aliasing.
But specifically double and std::float64_t on platforms, where they have the same representation:
What is gained by disallowing aliasing? Wouldn't it just be defined as a typedef on those platforms?
What is gained? Portability! It would mean your code does not stop working some time in the future just because the underlying hardware changes.
I am working on simulation code that is more than 40 years old. (This also means a lot of it is still Fortran.) There are some places where there is an implicit assumption on 32-bit platforms. It still works with the Intel Fortran compiler on 64-bit systems. But, the code is not standard anymore. This means that currently it is not portable to macOS on ARM. (I can’t directly use the Intel compiler to produce ARM code.)
If the computing platform changes in the future, it would be nice if the code still works. On the other hand it is really unlikely that the meaning of float or double will change (at least on desktop computers and compute clusters). Too much software has already been written. In my mind ‘int’ was meant to be the native size of integers. But, nobody dared to change it to 64 bit on modern computers. Too much software relies on it to be 32 bits.
You find yourself agreeing (with disallowing), can you explain?
What? How?
The "underlying hardware" doesn't just change, you have to port the code over to a new architecture.
Ensuring that your code is portable is achieved by migrating from double to float64_t.
Aliasing float64_t to double when they have the same representation does not impact portability.
If you move the code to a new platform where double has a different implementation, the only thing that would mean is that float64_t wouldn't be an alias of double of that platform.
What does impact is the ability to adopt the new type, and code bloat because now symbols are duplicated.
Because for no good reason, something that walks like a duck, quacks like a duck, and looks like a duck, was made not a duck.
________________________________
From: Std-Proposals <std-proposals-bounces_at_[hidden]> on behalf of Simon Schröder via Std-Proposals <std-proposals_at_[hidden]>
Sent: Saturday, August 30, 2025 1:42:09 PM
To: std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Cc: Simon Schröder <dr.simon.schroeder_at_[hidden]>; std-proposals_at_[hidden] <std-proposals_at_[hidden]>
Subject: Re: [std-proposals] TBAA and extended floating-point types
On Aug 26, 2025, at 10:55 PM, Sebastian Wittmeier via Std-Proposals <std-proposals_at_[hidden]> wrote:
I can understand some general reasons for the push-back on allowing aliasing.
But specifically double and std::float64_t on platforms, where they have the same representation:
What is gained by disallowing aliasing? Wouldn't it just be defined as a typedef on those platforms?
What is gained? Portability! It would mean your code does not stop working some time in the future just because the underlying hardware changes.
I am working on simulation code that is more than 40 years old. (This also means a lot of it is still Fortran.) There are some places where there is an implicit assumption on 32-bit platforms. It still works with the Intel Fortran compiler on 64-bit systems. But, the code is not standard anymore. This means that currently it is not portable to macOS on ARM. (I can’t directly use the Intel compiler to produce ARM code.)
If the computing platform changes in the future, it would be nice if the code still works. On the other hand it is really unlikely that the meaning of float or double will change (at least on desktop computers and compute clusters). Too much software has already been written. In my mind ‘int’ was meant to be the native size of integers. But, nobody dared to change it to 64 bit on modern computers. Too much software relies on it to be 32 bits.
You find yourself agreeing (with disallowing), can you explain?
Received on 2025-08-30 18:53:39