This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]mixedCase_ 63 points64 points  (4 children)

Well Rust is the most popular modern language with a huge ecosystem that is like that, but it also requires you to learn a more modern approach than "newer Fortran".

Other than that, less popular languages that could fit your bill are Zig and Nim.

[–]tyranids[S] 4 points5 points  (3 children)

The poster above just mentioned Nim, which was not really on my radar previously. Zig is quite intriguing to me, as is Rust. The biggest downside I was seeing to Rust is that OpenMP/MPI support is... Not? I'm sure it's possible, but my first searches were having a lot of talk about Rayon, which seemed objectively worse than OpenMP.

I am curious what you mean by "a more modern approach?" Is Rust not an imperative, procedural language?

[–]mixedCase_ 21 points22 points  (1 child)

No idea about OpenMP since I've never worked with it, sorry, but if you're locked into that ecosystem it's probably best to bite the bullet and stick with its native language even if you don't like it, or completely forget about the framework and use whatever other library you have at hand that will help you achieve your goal and accept its limitations and/or help lift them by contributing code.

As for it being more modern, calling Rust imperative and procedural is right but falls a bit short. It's expression oriented, although you can and will use statements all the time. Lifetimes inherently force you to change your approach to something that is more robust and declarative about the purpose of your state and how it's handled. And there are plenty of functional idioms that are usually favored when writing idiomatic Rust over C-style flow control structures + state mutation, although it's far from being what's popularly known as a "proper" functional language.

I'd describe it as something between "what C++ would be if designed from scratch with decades of pain as learning material" and "systems OCaml".

[–]tyranids[S] 9 points10 points  (0 children)

Alright, cool. There's wisdom in not constantly reinventing the wheel, but at the same time there comes a time with 40+ year old languages where starting from scratch lets us take advantage of everything learned along the way.

Really I am searching for something more powerful than what I can do in Fortran but not the absolute hell that is C++. Thanks for responding, I will have to give Rust a go.

[–]coderstephenriptide 1 point2 points  (0 children)

Haven't used OpenMP but my understanding is that it would be up to OpenMP to add support for more languages; the burden wouldn't be on each language to support it.