fortran-lang / stdlib

Fortran Standard Library
https://stdlib.fortran-lang.org
MIT License
1.02k stars 161 forks source link

Extend `sort_index` interface to allow `int32` index argument #822

Closed Beliavsky closed 1 month ago

Beliavsky commented 1 month ago

The index argument of sort_index has type int64. I suggest that the sort_index interface be extended so that an index argument of type int32 is also supported. I understand that int64 was chosen to accommodate very large arrays, but it in most cases int32 is sufficient, and many programmers use default integers. The current interface trips people up, for example here and here.

jvdp1 commented 1 month ago

thank you @Beliavsky for the heads up. Indeed, having both version could be useful. I will have a look.