Resistance to modernization

There remains the question of how much should be in the language itself, and how much should be simply in a library with a standard API. The latter approach can be done independently of the fortran standards process.

Also there is the quality of implementation issue, particularly regarding stack/heap allocation of temporary arrays used in the computation. Many think that a valid expression should never result in run time errors unless all resources are exhausted and it is impossible to compute. Others think that the results should be computed in the fastest possible way (e.g. stack storage only) and the programmer is responsible for rearranging the expression to avoid any runtime errors. Which of those two extremes should be the goal for fortran?

1 Like

Libraries are perfectly fine, imho.

1 Like

Fortran has included a nice amount of basic matrix/vector operations as intrinsic procedures. While adding more would be very nice, improving the existing ones are more important and urgent.

For intrinsic procedures, definitely the first one, IMHO. For libraries, it is the developers’ decision to make.

My first language is not English, and I understand that there is a technical meaning to “silly”. It means expending a lot of effort for no good result apart from amusement or distraction/diversion. When a technical person uses “silly” in a technical discussion, that is the first meaning that comes to mind.

This brings up something else that I’ve advocated in standard fortran, namely the ability to query the amount of stack, heap, or cache space that is available at run time at any moment during program execution. In the present situation, limits on these resources can cause a program to fail, yet the programmer has no ability to test for the available resources to prevent that failure. There are nonstandard, nonportable, ways for that test, but there are no standard and portable ways to do so. So when a programmer writes a library routine that requires these resources, at present he has no standard way to tune or modify the algorithm to automatically adjust itself based on that query.

Just to give one example, if one could query the amount of stack space, then the programmer could choose to use automatic array allocation of a temporary work array if that array fits on the stack. Otherwise the programmer could ALLOCATE the work array on the heap. That library routine could be written in a robust way so that it would never fail due to lack of stack space.

Yes, I understand that the fortran standard does not know anything about stacks, heap, or caches, but these are practical issues that are important. They have been important for decades to programmers, not just fortran programmers. It is long past time that fortran programmers are given access to this information.

3 Likes

Mmm many people are and have been interested in fortran for it being a high level language (for numerical computation, with the quite peculiar feature of being statically typed, something that modern high level languages more or less lack). The approach you suggest / wish goes in the exact opposite direction: it significantly lowers the level.

Continuing the discussion from Resistance to modernization:

What type of problem? What equations to be solved? FortranCalculus can solve most types of equations and is simple to use and it is free!

FortranCalculus is a Calculus based language that got its start from NASA’s Apollo Space program. NASA needed a fast solution to all math problems, not years as was the case with some difficult problems.

3 Likes

I see that FortranCalculus can cope with ODEs. Can it do elliptic and parabolic systems of PDEs such as one needs for heat and mass transfer in moving fluids? Its website also says it is for Windows only. Some of us use Linux or Mac.

Yes there is a version that does PDEs, but this version (Alpha) only does ODEs. Get some help solving PDEs by using the ‘method of lines’ (MOLs) and then this version should be able to solve your problem(s). [The PDE version is being used to teach how to solve PDEs in college and thus not available at this time.]

FortranCalculus is for non-programmers; e.g. engineers & scientists, so with MOL you should be able to solve most of college level PDEs in a few hours :slightly_smiling_face: