Another way to classify programming languages
Steve Yegge once wrote a fun article trying to place programming languages on a liberal-conservative spectrum. Roughly this axis was about "risk aversion":
I have a whimsical new classification: a two factor model, where the axes are "bloody-mindedness" and "fastidiousness".
It's not obvious whether these factors are actually correlated with each other: on the "more fastidious" end, we have:
- Rust
- OCaml
- Python (relative to its peers)
- Erlang
- Haskell
- Clojure
- and so on
At the other end:
- Perl
- Elisp
- PHP
- Javascript
- C
- Ada
This vaguely tracks the conservative-to-liberal spectrum of Steve Yegge.
But the bloody-minded languages seem to appear all over that spectrum:
- Erlang
- C and C++
- Almost any dialect of Lisp
- PHP
- Perl
Although Erlang encourages fastidiousness, this is not *enforced* by the runtime or the type system. Look at any idiomatic Erlang code, and you'll find manually-tagged tuples, careful handling of edge cases, meticulously designed supervision trees, and, er ... an attitude of letting anything just blow its own brains out at runtime and take half a dozen related threads out with it.
It's also not a question of direct memory access: Lisp won't let you access raw memory, but you can accidentally or deliberately just redefine fundamental things like "list construction" and "dereference this thing". Erlang doesn't allow raw memory access, but you can do hideous things like pattern matching on bit strings that span octet boundaries. At least C protects you from that!