Hacker News new | ask | show | jobs
by username223 244 days ago
Matlab/Octave is great for numerical programs that perform within an order of magnitude of Fortran. If some things aren't fast enough, you can rewrite them in C or Fortran without too much trouble. If you're doing anything other than numerical computing, it's awful, and you should use a different language.

(Source: I did a PhD using a mixture of Octave for numerical stuff, Perl for text-processing and automation, and C++ for the parts that were too slow. Choose the right tool for the job.)

1 comments

Modern Fortran is better all around. The compiler will check usage based on interface. It has a working and supported module system (unlike C++). A couple of openmp pragmas will parallelize it. Multidimensional dense arrays are first class objects. The compiler can emit code with array bounds checking. Keyword and optional arguments. Standardized C FFI. f2py inter-op with Python/numpy.

Most people encounter large FORTRAN IV or FORTRAN 77 heirloom codes, and assume that's what Fortran is like in 2025.