I don’t think we have any actually good programming languages, and I don’t think I’m alone in believing this. Programming is hard, and language design is harder. We’re still learning. But I think they’re all failing us in a shockingly fundamental way. The root of the trouble is a distinction I’d like to draw between data and objects. Let me know if you think there are better terms to use. Programming languages give us tools to represent things. Sometimes these things are values: the integer 1. A 1 is a 1, same as any other 1. Sometimes these things have identity: this integer 1 lives over here, and that integer 1 lives over there, they aren’t the same. This can matter because (just as one example) sometimes these things are mutable: now that integer 1 becomes integer 2. It wasn’t just a value. For some things, the internals should be hidden away, but for others, we wonder why we’re expected to litter all these repetitive getters and setters about. Sometimes, we can use a thing here or there without issue, and sometimes we have to serialize and deserialize it to get around. That action causes it to lose some of its identity: now there are two things. Sometimes we care about how these things get used, especially how they get extended. Perhaps we decide a Thing has a fixed set of behaviors. (I’m going to stop playing coy: an interface, with a fixed set of methods.) Then users can end up creating their own Things (i.e. new classes that implement that interface). Or alternatively, we can decide a Thing has a fixed set of variants (i.e. algebraic datatypes). Then users can freely create any behavior—any function—over a Thing. If you’ve been counting, that’s 5 different choices a language can make about how to represent something. Naively, there could be 32 different possible designs, and that’s assuming there aren’t a lot more choices than the ones above (and that they’re all binary… some aren’t!) But these decisions correlate together into essentially just two major desi...
First seen: 2025-08-21 05:40
Last seen: 2025-08-21 12:59