-
Notifications
You must be signed in to change notification settings - Fork 190
Generating sorting subroutines specific to character
type with fypp
#475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always happy to see negative line count patches. Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice -- in addition to the code simplification I think there are lessons on using fypp that would be nice to share more broadly.
@gareth-nx Thank you for your review. I believed I answered all your comments. |
@jvdp1 Thanks for the changes. If anyone with commit rights has time to assist, note this patch seems very straightforward (it is only code simplification) and has been reviewed twice -- but we need another reviewer with commit rights to move it forward. @milancurcic @ivan-pi |
@milancurcic @ivan-pi @LKedward Could one of you review this PR, and merge it if you agree with it, please? |
With two approvals this patch is ready to go. I'll go ahead and merge it now. |
Previously all sorting subroutines for
integer
,real
, andstring
were generated withfypp
.character
had its own subroutines.I noticed that some checks were not present in
character
-based subroutines, while present for other types. Therefore, I modified the fypp instructions, such that the sorting subrotuines are generated from a same template forinteger
,real
,string
, andcharacter
.With this strategy, if someone implements a derived type associated with
>
,<
,==
,...., the sorting subroutines can be easily implemented for this DT by modifying only the fypp instructions.Additional reviewer: @wclodius2