[J3] Consistency in conversion functions
Steve Lionel
steve at stevelionel.com
Tue Apr 4 15:18:31 UTC 2023
On 4/4/2023 3:52 AM, Jeff Hammond via J3 wrote:
> 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.
Technical reason - FORTRAN 66 limited function names to six characters.
Yes, we could now create aliases for these with longer names as
"syntactic sugar", but it would not add functionality.
A COMPLEX intrinsic has been proposed before, with slightly different
semantics from CMPLX - see
https://j3-fortran.org/doc/year/08/08-293r1.txt WG5 voted to not add it
to the worklist (https://j3-fortran.org/doc/year/09/09-100.txt)
I don't recall seeing a suggestion of an INTEGER() alias for INT().
Programming languages are often full of shortened and occasionally
cryptic spellings for things. The reason is usually historical (such as
the case here), but there has been a general preference to keep things
short, especially if they get used a lot.
Steve
More information about the J3
mailing list