[J3] Consistency in conversion functions

Jeff Hammond jehammond at nvidia.com
Tue Apr 4 20:09:14 UTC 2023

I don’t think it’s healthy for committee members to reject ideas just because they solve problems that don’t bother said members. Most of the proposals I’ve seen solve problems I’ve never even imagined and yet I trust that if they matter to others, they are worthy of my time, or at least not worthy of my negativity in the absence of obvious flaws.

To give a specific example, I’ve literally never wanted generic programming in Fortran and yet I support what Tom is doing because (1) it doesn’t cost me a dime to watch him work and (2) I trust that other people will benefit from it.

On 4. Apr 2023, at 22.25, Brad Richardson via J3 <j3 at mailman.j3-fortran.org> wrote:

External email: Use caution opening links or attachments

I'm sympathetic with the desire for consistency within the language, but this is not a thing that has ever really bothered me. I think there's other issues more worthy of our time.


On Tue, 2023-04-04 at 07:52 +0000, Jeff Hammond via J3 wrote:
To convert INTEGER kinds, we use INT().
To convert COMPLEX kinds, we use CMPLX().
To convert REAL kinds, we use REAL().
To convert LOGICAL kinds, we use LOGICAL().

Does this bother anyone else?

Are there technical or non-technical reasons why we bring consistency to this situation, by adding INTEGER() and COMPLEX() conversion intrinsics?  I have found the need to use INT() surprising and annoying often enough to have a practical motivation to solve this, not just an aesthetic one.

The only issue I see is that GNU has an extension COMPLEX() but I don’t see an incompatibility with CMPLX there, because the behavior of COMPLEX is a subset of CMPLX.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230404/62888cad/attachment-0001.htm>

More information about the J3 mailing list