Am 19.10.24 um 10:40 schrieb FX Coudert:
Hi,

As UNSIGNED has been booted off the F202Y list, I think calling it
an extension at this time is fair.

Looks good to me.  And yes, calling it an extension is fair.

I apologise, I had missed this piece of information. If UNSIGNED is > not on 
track to becoming a feature in the next standard, is there
really high value in implementing it in gfortran?

Yes, I think so, for several reasons.

One is the chicken-and-egg problem:

One of the points of the discussion on github was the lack of a major
compiler implementing unsigned integers.  Well, that is now no longer
the case, not that gfortran implements it. The author of f18n has
already started working on implementing it, using the same
specification that gfortran uses.  Two compilers implementing the same
extension the same way is more likely to sway the mind of enough
people on WG5 to let this pass the next time.

Second, the feature is clearly isolated behind a flag; nobody will use
it by accident.

Third, this was passed by J3 with modifications to my original paper,
and the modifications that were made have resulted in something quite solid. There was enough support to let it pass, but apparently it
was torpedoed by people who do not believe a general-purpose language
should have access to modulo 2^n arithmetic.

Fourth, I have already put in the work.  Maintenance will very likely
be very low, and I certainly will do it.

Fifth, if we do nothing now, the can will be kicked down the road
another 10 years - the next chance to include this would be in
Fortran 203X.

Sixth, this is extremely useful - automated writing out of prototypes
so interfaces to C can be checked by compilers is a major point,
as is having access to 2^n modulo arithmetic. With this, it is no
longer necessary to turn to C for such things.

Best regards

        Thomas


Fortran as a language is moving from a past where it was a nightmare of > incompatible extensions, into a more standard-based language. I
personally> think it is a good evolution.

In general, I agree, but not in this particular case.

Big extensions (like Cray pointers) have shown in the past how hard they > are to maintain in the long term: lots of dark corners that we never
get fully right.

Cray pointers were poorly defined from the start, and the only "dark
corner" for unsigned integers is whether to allow overflow and use
modulo 2^n arithmetic, or prohibit this (and disallow major use cases,
which I personally would find silly).

Best regards

        Thomas

Reply via email to