|
|
|
|
|
by pconner
3460 days ago
|
|
> FORTRAN’s conflation of functions (an algebraic concept) and subroutines (a programming construct) persists to this day in nearly every piece of software, and causes no end of problems I'm not really sure what the author's point is here. I think "subroutine" is a more descriptive name than the more commonly-used "function," but I'm not aware of any problems this has caused. |
|
Subroutines (I prefer the term procedure) are just a sequence of commands. They may use arguments and return a value but they can also do anything else.
Functions, real functions, can be reasoned about, composed, mapped over collections, and otherwise trusted to behave themselves. Very few programming languages provide strict functions. One may write them, of course, if one is careful, but that is doing work a compiler could be doing for you.