Opinions on Programming Languages: Summer '19
Like most programmers I end up working with a variety of languages, each with their own pros and cons. As I learn more languages and work with them more my opinion shifts, so I thought it would be good to write down my current thoughts.
When evaluating a programming language there are a number of things I’m considering.
- Language syntax and what it is like writing it.
- Language features such as async, modules, OOP, etc.
- Standard library quality and facilities.
- Tooling such as package managers and build tools.
- Ecosystem with libraries and resources like tutorials.
The old standard. C is a great language in itself with a simple syntax and a low-level manual approach that makes it great for systems level and embedded applications. It’s a minimalist language without a lot too it which is at once its biggest strength and weakness.
But the standard library is at best mediocre. It carries decades of baggage and has the distinct feel of being designed by a comittee bit by bit, which it was. It is inconsistent, missing common features, and creates so much more fricition for the programmer than necessary.
Documentation is also hard to find. The C Programming Language book is
fantastic, but is a physical book. Documentation for the standard library is
hard to find outside of the official
man pages and often conflictingly
overlaps with C++ documentation.
And the tooling… oh god the tooling. Compiler flags are a mess of options for
legacy reasons and daunting to newcomers. Autotools and
make were passable in
the 80s but are just painful today. And pacakge management is usually done with
the system pacakge manager which causes all kinds of problems.
Clang and it’s realted tools like Clang-Format and Scan-Build help but aren’t
quite enough. Though I will say
-fsanitize=address is very helpful and I use
Huge ecosystem though. Libraries for everything and plenty of resources online if you can sift them out from the C++ ones.
Overall though I tend to like C, but I would avoid it for anything complex.
C++ has always just felt like C with a whole bunch of extra features bolted on. And I know C++ devs would argue that it’s not and that it’s a fully fledged and powerful language. But it’s never felt like that to me, and because of that I’ve never really like the language.
Aside from that its got most of the same problems as C, questionable documentation (though better than C) and terrible tooling. And no CMake isn’t good enough to save that.
Oh Go… I want to like this language. I feel like I should like it.
But I don’t.
I truly cannot bring myself to like the syntax of the language itself. It is filled with meaningless breaks from convention that just make the language more confusing and difficult to use. Features wise it tries to be even more minimalist than C in all the wrong ways.
Documentation is good though due to
godoc and the community seems to have
found itself a set of standard practices that make it all work.
Tooling is also fairly good and they’ve finally gotten the package management
system figured out with Go modules.
Also I like their unit test system which is always a plus.
The standard library and ecosystem are both first class though. On the off chance whatever you’re doing isn’t in the standard library you’ll be able to find multiple high quality libraries for the task.
Go, I think, is a “productive” language that tries to be easy to create software in.1 And I guess it succeedes in that respect, and I would even use it in projects if I thought it was the tool for the job.
But I still don’t like it.
Java gets a lot of hate, but I really don’t mind it. Of course I’m also not in an enterprise environment. Also it’s licensing is weird but that’s not what I’m judging right now.
The language itself is, while overly verbose, featureful and powerful. It’s fully object oriented and embraces that methodology fully, which in my opinion is what you must do if you’re going down that route.
The ecosystem is good with plenty of high quality libraries and tutorials online. The documentation is… there. It’s not amazing and looks ugly but is all there with examples so not much to complain about.
Tooling is… mixed. Package management and build tools are varied such as Gradle and Maven. But nothing ubiquitous or even very good. Gradle has crashed my machines more than once…
I’ve tried Kotlin a little but not enough to have much of an opinion on it, though everyone says it’s a “better Java”.
I don’t hate it, but it’s more than a bit of a mess. If you’re using it sparingly and for its intended purpose it’s actually not so bad and is a good way to extend the functionality of basic web pages.
At least the documentation is good. MDN is an amazing resource and I constantly have it open when working on a web project.3
The language itself is somewhat all over the place. It is both object oriented, and not; both functional, and not. It’s generally just all over the place. And the whitespace usage… oh the whitespace. I’m not a fan. Using whitespace to delimit blocks is just confusing to me and does nothing for readability.
The standard library is robust and “batteries included” which is a big plus. Generally it is all of high quality, though I have heard that there are some problems in places and that the developers are trying to thin it out to increase maintainability.
The ecosystem however is second to none. I don’t think even C has the number of available libraries that Python has, and there are thousands of tutorials and guides. Documentation is also quite good quality overall, but not amazing.
Tooling is alright. Pip is nice, but the packaging story isn’t great. Lot’s of strange issues and incompatabilities seem to arise while packaging. It’s not as bad as say C but it could be much better.
The biggest problem facing Python is the whole 2 vs 3 split. Python 2 is going end-of-life soon but a lot of important software is still written in it.
Ruby is often overlooked as a general purpose language, and many just use it for Ruby on Rails. And while Rails is great, Ruby is a great language itself. Generally I consider it to be a “better Python” of sorts.
The syntax is nice and clean while also being easy to read. The whole “parenthases optional” thing when calling functions felt odd at first, but you quickly get used to it and it starts feeling more natural. Overall the language deserves its reputation for developer comfort.
Whoever thought of the block syntax (presumably Matz) deserves a medal of some kind. I’ve never seen another language with a feature like that and it adds so much flexibility without much complexity.
The standard library is solid but not huge and is overall well documented. It
has a lot of little things that I never thought would be useful but end up
coming in handy all the time such as
.last for the last element in an array.
Tooling and ecosystem are both quite solid. There are plenty of Ruby “Gems” and both the Gem and Bundler tools are quite capable package managers. Bundler specifically impressed me as a great alternative to the woefully common virtualenv pattern in Python. Rake is also very nice and rather underrated as a generic build tool.
I only learned Ruby somewhat recently but I’ve already started using it for a number of projects. It’s certainly not perfect but it’s a joy to write.
Also I attempted to contribute to Ruby itself which you can read about here.
Rust, Rust… Where do I even begin. I see Rust like diamond with a crack inside. Some may think of it as flawed, but that only make it sparkle even more.
Ok enough poetry. In all seriousness Rust is my favorite programming language. It’s the perfect mixture of things I like and gets all the things I consider important to be just right.
The language itself is a big factor. Reasonable syntax just filled with features to help developers that I often find myself sorely missing in other languages. The borrow-checker as well, the headline feature of Rust, is fantastic once you understand it and lets you write fast and safe code productively. The compiler also has the best error messages I have ever seen, pointing out exactly what is wrong and suggesting solutions and further resources and explanations.
And the fast pace of development is also a big plus. Rust is a relatively young
language, and they are constantly adding new features. The upcoming
the beginning of an advanced async system built right into the language.
Some argue however that Rust is becoming a “big” language with too many
features, which is somewhat true, but the language also prevents you from
misusing those features and helps you do things right.
The standard library is decent but intentionally not very big. This does let it
maintain a high level of quality and provide a lot of very useful and powerful
features and constructs like
Result. It is also very well documented and the
Rust Book is a great resource.
Ecosystem is admittedly Rust’s weakest point. There aren’t a ton of high quality libraries and a lot of use cases are simply not covered. But it is growing rapidly and easy to contribute to so that’s a big plus. Generally it is similar to Ruby and Go’s ecosystems but less mature.
The tooling for Rust is simply amazing and the best I have ever used. Cargo is an amazing tool operating as both a fantastic package manager and the best build system I have ever used. And the expanded tooling such as the Rust Language Server and Docs.rs are incredibly useful.
Overall I love Rust and recommend every programmer I know to at least try it.
Admittedly I haven’t used Scheme as much as I’d like to. But I have gotten a taste of the various flavors of it, specifically (in order of my use) Racket, Chicken, and Guile.
I have come to like Scheme in my usage of it though. Being a simplified and standardized version of Lisp makes it very powerful and flexible without being overly complicated like Common Lisp can be.
Each implementation I have used has its own strengths and weaknesses:
Racket is powerful and has a great standard library and tooling, but is somewhat complex compared to other Scheme implementations.
Chicken has great C interop and can be compiled all the way down for maximum speed, but isn’t terribly popular and lacks a good ecosystem.
Guile is used heavily by GNU tools5 as an extension language and is useful in it’s own right.
Overall Scheme suffers from a small userbase and ecosystem, but what is there is usually very high quality and the language itself is wonderful. The different implementations do fracture the community though, but in some ways that is beneficial.
Languages I want to learn
These languages I don’t know but want to at least learn more about.
- I once saw someone describe Go as “Google’s Fischer Price language” which I thought was fitting for some reason. [return]
- I won’t get into my dislike for Electron here. [return]
- Usually because I’m wondering why things don’t work as expected. JS is very messy. [return]
- This seems to be the common trend among those I know as well. [return]
- And the GNU Guix distribution. [return]