Your Sucks Programming Language Favourite

Much to my chagrin, I've found myself lately becoming a defender of C++. People who a) know me and b) appreciate irony should feel free to smirk right about now.

To be fair, modern C++ has improved significantly, reaching rarified hights of not-badness only dreamed of fifteen years ago. But that's kind of beside the point. When you choose a programming language for a project, the quality of the language itself is often less important than external stuff; the quality of available implementations, tools, research, etc.

If I'm going to bet my (hypothetical) business on investing a zillion dollars to write a program that I can then sell, I want to know that:

  1. The development tools aren't going to rot or disappear because the vendor lost interest (e.g. Visual Basic).
  2. I'll be able to hire skilled developers whenever I need to.
  3. Good quality tools, books, training, etc. will all be available when I need them.

(And as a developer, I want to bet my non-hypothetical livelihood on developing the skills that are most likely to keep me employed. Being a really badass Haskell programmer doesn't really do much for my job search1.)

So let's concede that Rust (for example) is a better language than C++. C++ will still be a better choice for most commercial ventures in that space because it has:

  1. Multiple high-quality implementations, two of which are FOSS2
  2. A huge selection of high-quality third-party tools
  3. An enormous community of developers with whom you can exchange knowledge
  4. A literal half-century of concerted research on how to use it effectively

C++ sucks in a variety of ways but we know exactly how it sucks and how to work around it. Rust's suckage is still unknown, and I want the thing that keeps me from being homeless3 to have a really good track record.

And this principle applies to Scala-vs-Java, Zig-vs-C, Haskell-vs-anything, anything-please-anything-vs-PHP or any other language debate. $FAVORITE_LANGUAGE may be a better language than $CHOSEN_LANGUAGE but that doesn't mean it's going to get the job done better, faster, cheaper or more reliably. All of that depends on the entirety of the language's ecosystem.

Note that I'm not saying don't use $FAVORITE_LANGUAGE. Just be aware of what's riding on that decision. For a hobby project or an in-house tool that took a month to write, it's going to be fine. But for the hundred person-year project the business depends on? I mean, I'd really like $FAVORITE_LANGUAGE to be viable in ten years but I'm not going to bet the mortgage on it.

Also, you should go out and learn all kinds of programming languages--especially wierd ones that will never fly in Industry--because it will make you a better programmer. I got a lot of benefit as a C programmer from asking myself, How would I do this in Smalltalk?

I'm a programming language nerd. I've spent a lot of time thinking about how languages work and how they make people think about programming. I learn new languages for fun and I've designed and implemented several. So I absolutely get the desire to use better languages and the frustration of having to deal with the broken status quo. In a perfect world, we'd all be using Smalltalk.

Unfortunately, our world is fallen and so C++ is a necessary evil.

  1. Okay, that's an exaggeration. A good hiring process will recognize that Haskell skills are often transferable to whatever the company is using. Unfortunately, a lot of otherwise-fine employers have terrible hiring processes and will reject any résumé not listing the exact version of their preferred web framework. As those companies have money they will exchange for relatively pleasant work, I would like to retain the option of working there. 

  2. But if $FAVORITE_LANGUAGE is FOSS, that means it will be available forever! No, not really. If nobody else is working on it, you'll find yourself having to maintain the toolchain by yourself. At that point, it's almost always easier to just rewrite your program in something else. 

  3. Yeah, yeah, I know; the real problem is Capitalism. 

#   Posted 2021-07-04 17:16:50 UTC; last changed 2021-07-04 18:09:16 UTC