@blakeyrat said:
@communist_goatboy said:Most numerical software in astronomy is written in C or FORTRAN 77.But why? I have to admit I have no knowledge of FORTRAN, but I can't think of a worse language than C for this use.
Is it just the same as the video games industry where they used C because they had a good reason to 15 years ago, and now that they no longer do they can't switch because they're all dinosaurs?
From what I remember from my couple years dallying with a career in astronomy it's a combination of those languages being very fast and because they're the languages everyone else uses. The second point I'm sure will bring plenty of hackles around here but these people in many cases learned programming from other physicists/astronomers who only know and work with those languages. In my graduate program there was a computational physics course and you could do the work in FORTRAN or C/C++. It was taught by a member of the physics department and for a lot of people it was their first time writing code. Outside of that if their research required programming it often meant working with their adviser's code which again tends to be FORTRAN or C, and again it's often their first or one of their first exposures to coding.
To be fair they are fast languages with good support for writing massively parallel software (this last is kind of circular of course; the good support exists because physicists and astronomers knowing mostly FORTRAN and C needed to be able to write code to run their massive simulations on supercomputers and so people wrote it and improved it over time because of that need). And having a good base of existing code which has been used, tested, and fixed is not something which should be thrown away. But coding is a means to an end for most of these people and it's not high on most of their lists of priorities to improve their software skills or to find new languages or environments to work with.
Of course this is all a great recipe for WTF code but at least in this case they are not only the developers but also the users, and the pain they inflict from is only on themselves and not paying (or not) customers.