Here is my third draft on a model for scoring programming languages for primitive safety. Any feedback or pull requests for new languages appreciated!
I was thinking of doing a matrix of “what effects can happen magically?” between languages. E.g. in most languages (i.e. not Haskell), a function can “secretly” do I/O. In many languages a function secretly allocates/deallocates, but Rust makes this more explicit. In Go/Erlang/Python-with-the-various-eventing-libraries, a function can secretly switch between threads without this being visible. If you want to add custom effect types you pretty much need higher kinded types.
Not sure whether this leads anywhere useful, but it was interesting to think about.
It is interesting. I think you’re right, most languages have the ability to do implicit work. The other thing I was thinking (but didn’t put in yet) is how exceptions can without warning change execution order, but I’m not sure how to represent that.
Exceptions are absolutely a thing I want to include in that matrix. In particular I think there’s an analogy between Java’s checked exceptions and language-level specialized support for concurrency that doesn’t fully generalize (i.e. built-in STM or C#’s async/await)