[J3] Input/Output for enumerators
Malcolm Cohen
malcolm at nag-j.co.jp
Tue Oct 12 07:20:58 UTC 2021
> My message did note (at the end) that Clause 12 addresses only I/O for interoperable enumerators.
Actually, as I wrote, Clause 12 does address the minimal requirements for I/O of enumeration types. With explicit formatting and the I edit descriptor one can do i/o with the ordinal position; this is certainly very minimal, but is valuable enough in its own right that it’s good to have it.)
As I wrote:
<<<
For an enumeration type aka “true enumeration”, there is nothing stopping us from adding some kind of improved output in the future. These are the topic of p7, not p6. I agree that some kind of improved output is desirable in the medium term; it was removed from the spec as part of the compromise to get true enumerations at all. For now, it reduces the initial implementation cost, and reduces the complications in the standard.
There are also multiple possibilities for what that improved output might be. You mention one possibility, other obvious possibilities would be “the name in the definition”, or “a delimited name” (so it is less likely to be confused with another type). I do not consider the time and effort needed to carefully examine all of these, and build consensus on one particular one, is warranted at this stage; I would rather focus on getting what we have in the standard right.
>>>
I do think that many/most of the committee would agree with you that treating enumeration types only as integer is, in the medium/long term, sub-optimal. I hope that we can get this sorted out for the following revision (F202y).
Cheers,
--
..............Malcolm Cohen, NAG Oxford/Tokyo.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211012/0e68b401/attachment.htm>
More information about the J3
mailing list