4 ms·
Are things like higher order functions and closures relevant features for Fortran programmers? This is an open-ended question. [edit] Just to be clear, I don't
by ogogmad 5y ago
Are things like higher order functions and closures relevant features for Fortran programmers? This is an open-ended question.
[edit] Just to be clear, I don't think Fortran has these.
- milancurcic 5y agoIt's limited. You can pass functions as arguments to other functions. You can't return a function as a function result.
- ogogmad 5y agoI was asking whether these are worth having in a future version.
- milancurcic 5y agoOops, I missed that. I would enjoy this feature but I think it's unlikely to be considered by the committee. As far as I'm aware it hasn't been discussed.
- adgjlsfhk1 5y agoSpecifically, Fortran's type system isn't nearly advanced enough to usefully support this type of feature well. Higher order functions are really useful, and if you want them, you should use a different language.