-
Notifications
You must be signed in to change notification settings - Fork 21
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
Remove goto #74
Comments
FWIW, the use of |
GOTOs gotta go. Perception is very important. We can refactor and not duplicate code. |
Perception is everything for minpack, it's our "poster child". Let's figure out how to do the error handling correctly without goto, and without losing any performance and without duplicating code. |
FWIW, the comment @certik linked was mine. Please feel free to take anything I say with a few grains of salt, since I really don't know much about Fortran. C code has some |
@rgommers actually, what you say is very important, as you are our ideal "customer". You are not a Fortran person, but you are in charge of quite a lot of Fortran code in SciPy and you are not against Fortran if we can fix all the very real technical problems with Fortran (in the broader sense). So we really appreciate your frank feedback. |
I have not looked at the code yet, but can we not use a named BLOCK
construct, so that most of the GOTOs (if not all), are replaced by "exit
ordinary_handling" or the like? At the end of the block you then get all
the error handling.
Op ma 6 jun. 2022 om 16:24 schreef Ondřej Čertík ***@***.***>:
… @rgommers <https://github.com/rgommers> actually, what you say is very
important, as you are our ideal "customer". You are not a Fortran person,
but you are in charge of quite a lot of Fortran code in SciPy and you are
not against Fortran *if* we can fix all the very real technical problems
with Fortran (in the broader sense). So we really appreciate your frank
feedback.
—
Reply to this email directly, view it on GitHub
<#74 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN6YR5QOLKENF4WAXAON5TVNYCZJANCNFSM5X7KAQLQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
See the PR #75. So far, just for |
The code has about 30 occurrences of goto. We should replace it with modern Fortran's
exit
,cycle
,return
and other flow constructs.This is very important to make people more excited to use the new code base (such as for SciPy #14), see e.g. this comment:
The text was updated successfully, but these errors were encountered: