4 ms·
Modern Fortran is beautiful and I love coding in it. However, my understanding is that its main focus is on array computations. Now with hierarchical data stru
by hatmatrix 5y ago
Modern Fortran is beautiful and I love coding in it.
However, my understanding is that its main focus is on array computations. Now with hierarchical data structures and graphs becoming ever pervasive, I wonder if Fortran will ever try to compete in this space (when these higher-order concepts are integrated into domains of Fortran's past dominance in numerical simulation).
- noobermin 5y agoHonestly, it really shouldn't, at least IMO. Where may be once it was used for other things, today it's essentially a DSL of some sort for the numerical computations you specify. It doesn't need to be used for a game engine (game engines can go ahead and call fortran code as they might).
- xioxox 5y agoAs a comparison, I have to program in Fortran in my day job, and I really hate it. On the negative side, text handling is really horrible (even with the new variable length strings), there are very few good libraries outside of numerics, a lack of type-safe generic data structures (like C++'s STL), buggy compilers (my code has some horrific pointer hopping to work around gfortan's bugs), the C-Fortran interface is horrible to use and there's little good documentation on the language. The positive things are the multidimensional arrays and slicing, and the modules.
- _0w8t 5y agoHierarchical data structures are bad for CPU caches, see, for example, references in [1] how various data-oriented programming techniques try to avoid them. From that point of view Fortran may be even more relevant for high-performance computing now than even 10 years ago. [1] https://en.m.wikipedia.org/wiki/Data-oriented_design https://en.m.wikipedia.org/wiki/Data-oriented_design
- freemint 5y agoB-Trees are very much not bad for CPU caches,neither are tries. Generalizations like this are harmful.
- ogogmad 5y agoGraphs can certainly be modelled as matrices over different kinds of scalars. But I'm not sure how relevant this is to your use case.
- kergonath 5y agoFortran is the ideal language for data-oriented programming. Ultimately that’s where performance is. I don’t see it trying to compete by creating a kind of graph-oriented language (besides pointers and somewhat barebones generics). You probably want a fancy higher-level language for this anyway. It is evolving towards a great language for parallel HPC, integrating neatly both shared-memory and distributed computing in a very nice framework. Much better than the usual hodgepodge of OpenMP and MPI (or whatever API du jour NVIDIA or Intel happen to be pushing).