Hacker News new | past | comments | ask | show | jobs | submit login

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).




Hierarchical 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


B-Trees are very much not bad for CPU caches,neither are tries. Generalizations like this are harmful.


Fortran 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).


Honestly, 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).


As 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.


Graphs can certainly be modelled as matrices over different kinds of scalars. But I'm not sure how relevant this is to your use case.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: