There’s to be no final, uptodate list which programming languages are available on Haiku. Or I just haven’t found it. (Please point me to that list, if it exists.)
It seems there are these:
C, C++, Python, YaBasic, Vala, D, bash. I’m sure there are more? (At least several non-bash shells and gcc-frontends, I guess.)
FreePascal is also available. AND there have been some efforts to bring the port of Go to something close to the current version. Though importantly, most non-C++ languages do not have bindings to any of the native Haiku APIs per se.
Off the top of my head Lua and Perl are also avaliable.
D can be compiled with some coercing iirc but I don’t think it’s readily available
(Or maybe it’s very outdated, I remember having issues compiling things with dmd)
I’m sure there’s many more
Edit: Mono and .NET were available or close to available too at some point.
There’s also perl available (not sure if anyone uses it anymore), and there was a port of Swift some years ago (not sure if that’s still working or maintained)
The closest thing to an up-to-date list would probably be to look at the haikuports repo under the “dev-lang” directory. But not all ports there necessarily have to be in working condition.
A very long time ago I ported SWI Prolog but I am not sure if it still works, I have not checked on the recipe in years. However it was an easy port so shouldn’t be difficult to update.
(Guida isn’t in HaikuDepot, you have to download it, but you don’t have to port it - the compiler is a Node program, if I remember right. It’s a reimplementation of Elm, a Hasell-like javascript compiler.)
I haven’t used it on Haiku, but “es” is in HaikuDepot - an interesting shell programming language.
Speaking of shell program, there are of course awk (really gawk) and sed. Awk is mighty useful.
There’s FORTRAN, though I hardly recognize the language I started with in the ‘70s.
As far as I know, those directories are for language-specific libraries and stuff (like python submodules etc.), C++ also has it. (assuming you’re referring to dev-cpp, dev-python et al.)
The layout and package naming comes from Gentoo Linux and they do some strange things sometimes. Usually the main compiler/interpreter is in dev-lang, with the other bits/libraries/tools in specific directories like dev-perl, dev-python, etc… This isn’t always the case though.
Chicken Scheme is there too, but the compiler fails to build executables, so you’re restricted to the interpreter. Fans of Common Lisp have ECL and SBCL as well.
Unfortunately Rexx is only there in the form of a quirky old interpreter called BRexx, but Regina should be easy enough to build from source; I can try later if anyone’s curious.
That’s because modern Fortran is not exactly FORTRAN (mind the difference in capitalization). Starting with the Fortran 90 revision, the language introduced lots of modern features, and keeps evolving since then. You probably mean FORTRAN 77, which is considered legacy since the 90s. However Fortran is notorious for backwards compatibility, so you can easily compile legacy code. This makes sense since there are tons of legacy tried-and-true numerical codes, written in the 77 standard.
Haiku has gfortran as part of GCC. I use it extensively, and it works great.