|
|
|
|
|
by greglindahl
3434 days ago
|
|
With the usual method of declaring a function, it was easy to understand that 'x' was local to the function. Adding a second, more concise way to express functions led to confusion about the scope of 'x'. Also, declaring types for the function and arguments (which is optional but has been strongly recommended since the Fortran '77 era) had to be done outside of the function, which again is unlike the usual syntax. The only code I've ever seen statement functions used in dated from the 1970s. |
|
It looks a lot people who had some confusion with the scope of x in something like ...
would also have problems quickly seeing the scope of x in lambdas that are present in a bunch of modern programing languages like python. It seems python lambdas also don't support type hinting like you mention was a problem in Fortran, too.