r/ProgrammingLanguages • • Apr 13 '26

Reflections on 30 Years of HPC Programming: So many hardware advances, so little adoption of new languages

https://chapel-lang.org/blog/posts/30years/
48 Upvotes

21 comments sorted by

View all comments

30

u/protestor Apr 14 '26

It makes no sense to add a safety column that lists java, c#, rust and swift as safe, but javascript, python, go and julia as unsafe

actual unsafe languages are c, c++, and the likes

24

u/WittyStick Apr 14 '26

They're probably hinting at static type safety specifically. The ones listed as safe are statically typed, and those not ticked are dynamically typed.

9

u/bl4nkSl8 Apr 14 '26

Correct. Type safety is one thing but memory safety is even more critical and dynamic languages that aren't safe tend to be fairly memory safe.

Rust though is both (yes, sorry, I had to)

3

u/jesseschalken Apr 14 '26 edited Apr 14 '26

Still a pretty fuzzy definition. All the listed languages will panic/throw in certain situations, like an out of bounds index. The statically typed languages check a lot more at compile time, but its a sliding scale.

1

u/ExplodingStrawHat Apr 14 '26

Are there any production languages that never "panic/throw"? Elm likes to put "no runtime exceptions" in their marketing, although I hit infinite recursion runtime crashes pretty early on during my usage of the language, so it feels like a lie for the sake of marketing. I guess one could trampoline everything so the stack doesn't blow up as easily 🤔

2

u/jesseschalken Apr 14 '26 edited Apr 14 '26

The only languages I know of that guarantee lack of panics are those that also guarantee termination such as Agda and Idris.

1

u/ExplodingStrawHat Apr 14 '26

Oh right, I had completely forgotten about those :p

-1

u/braaaaaaainworms Apr 14 '26

The frequency of panics/throws ranges between different languages, when a panic/throw is the primary error handling mechanisms that occurs outside normal execution (looking at you, C++), programs tend to die in places that weren't expected to throw an error

3

u/bradcray Apr 14 '26

u/protestor : As the author of the article, I wanted to clarify my intention with this table.

I didn't mean for the lack of a checkmark in a given column to indicate that a language is unsafe, unproductive, or non-portable (say). Rather, as the paragraph leading into the table attempts to explain, my focus was more on which factors were prominent in a language's motivation for being developed or primary reasons for it becoming popular (to the best of my understanding). Put another way, I imagine that none of these language designs took the stance of "We simply don't care about safety / portability / performance," and I was looking for ways to make the table something other an 8x4 matrix of checkmarks.

As an example, when I think about the major reasons for why Java or C# were developed, safety and portability spring instantly to mind. Similarly, I consider the combination of safety and performance to be major factors in Rust's design. In contrast (based on my knowledge and research), I didn't get the sense that safety was among the _primary_ design considerations in the development of Python or Javascript (say); but again, in saying that, I don't mean to imply that they didn't worry about safety or considered it unimportant. I realize that my approach could be misinterpreted as implying that I consider them unsafe, but that wasn't my intention, and I'm sorry not to have made it clearer.

The harder part for me to evaluate in making this table was the "why they took hold" aspect. Python is arguably much safer than Perl or Bourne shell (say), so its relative safety is probably among the very large number of reasons that it's become so dominant as a scripting language. Is that a large enough factor to earn a checkmark? I wasn't sure and didn't find much evidence that it outweighed other factors, so didn't give it one. Given my approach, the table was meant to be more notional than authoritative, and I'm certainly open to being convinced that I got something wrong.

All that said, the main point of the table was to point out that language designs focused on factors like productivity and safety have made significant inroads in mainstream computing, suggesting that there's a hope we could improve on Fortran, C, and C++ within HPC.

4

u/protestor Apr 15 '26

I think what you can answer is. What's the meaning of "safety" for the purpose of your table?

I understood it as "memory safety" but as other people mentioned a more reasonable reading is "type safety"

But now you seem to refer to a generic "safety" but I don't know what it means

3

u/bradcray Apr 15 '26

I was thinking of it broadly, encompassing memory safety, type safety, and parallel safety (e.g., preventing race conditions).

Those interested in a more in-depth comparison of languages with respect to memory safety may be interested in this blog article by my colleague Michael Ferguson: https://chapel-lang.org/blog/posts/memory-safety/