(j3.2006) an intrinsic for SORT()
Clune, Thomas L. GSFC-6101
thomas.l.clune
Mon Feb 5 16:39:55 EST 2018
A colleague was pressing me on why Fortran does not include an intrinsic procedure for sorting integers and reals. I gave him some of the likely reasons that such an intrinsic may not get much priority, but thought I?d at least ping the mailing list to gauge interest/history. I strongly suspect the issue has come up before. But if not, or if there are other reasons to think the situation has changed, I?d be happy to submit some use cases for this.
One argument against is that C interoperability already gives us a way to do this using external libraries. The counter argument is that sorting comes up frequently in different programs, it would be convenient to be able to have it available as an intrinsic. Presumably a similar tradeoff is made for many of the intrinsics that could be external library calls.
Another argument against is that there are multiple algorithms for sorting with varying complexity implications. While true, a similar argument can be made for RNGs, and it is still useful to have an intrinsic RNG for the many cases when that is ?good enough?.
Thoughts?
- Tom
More information about the J3
mailing list