Bare Fardel

language expressiveness is a good standard library

16 October 2022

Ruby is expressive. Why? It's easy to smash your data into shape. To form a shape from clay. Why? It has a god-tier standard library.

Go is not thought of as expressive. It mostly has an excellent standard library, but the collections library features are dogshit (range is not an acceptable substitute for a real collections library. Yes, I understand that a historic lack of generics makes this difficult). It does have a well-rounded standard library outside of collections, and very good tooling and editor support, which saves it for me, but it's very verbose and oftentimes a struggle to get data smashed around the way I want it.

Some people say JavaScript is expressive, and they are unwell. The standard library is a burned-out husk. The collections functions are dogshit: every project I've ever worked on imports Lodash to get anything done.  (Much like having a range operator does not magically make your language expressive, having a map function doesn't make the language expressive either, so eat your heart out, functional programmers.) The Date library is so bad it doesn't even bear talking about. There is no built-in CSV support, there is nothing for CLI tools. The result of this is the Cambrian explosion of npm modules dedicated to doing things which the language should do on its own, which in turn massively increases the dependency attack surface area (as well as the dependence maintenance surface area).

My opinion is that expressiveness is bullshit. By a conventionally accepted definition, it means something like "can I express myself easily and naturally in this language?", but for my use cases, it means: "does this language have a standard library which makes standard operations 1 function call away?". So I'd rather just ask that question instead of "is it expressive?".