No More Programmatic Verbosity
I’ve been disillusioned with programming languages for a long while. I started coding in the 70s and more than 30 years later here I am in a funk about programming languages, but I do see rays of light.
First, let me tell you about the languages I like:
- C
- Pascal
- Algol
- Lisp
- Prolog
- Scheme
- Python
- Clojure
- Arc
- Smalltalk
And that’s not a complete list, just those languages I most like, including some modern ones.
But here’s a list of languages I absolutely hate.
- C++
- Cobol
- Java
- Objective-C
- Common Lisp
And why do I hate them? Verbosity and ugly syntax, primarily. Either one, the other, or a hideous combination of the two. And it’s the rise of languages such as C++ and Java that I more or less no longer program. I just can’t see myself being impeded in my progamming by the verbosity of the language. I want to write small, tight code with the least amount of interference from the language syntax and semantics.
To me, it all went wrong when we went from C to C++ and then onto Java. Each one in turn uglier and more verbose than the last.
But things started to change recently. I’ve watched as languages such as Scala, Ruby, and Python arrived. Each one does part of what Lisp does, but none have gone the full distance to Lisp — namely “Code = Data”. However, each isĀ ray of light. Each allows you to write small, succinct code. The syntax and semantics are (for the most part) there to help you. They’re wonderful languages. I’ve watched as my development teams have written dozens of lines of code to implement a feature, as opposed to dozens of pages of code. The developers have told me that they didn’t think it possible to see a 10:1 or better reduction in code, yet there it was. And that reduction by an order of magnitude in the number of lines of code required is also a reduction by an order of magnitude in the number of possible bugs! A bonus all around: faster coding, fewer bugs, more comprehensible code! Woo hoo.
Of course, they’re not all equivalent in their elegance. Two stand out for their maturity, elegance, and fitness of purpose: Clojure and Python.
I like Python because it has some elegant pieces, namely the way it enforces indentation. It’s easy to comprehend and handles XML and other web-based necessities with flair. It’s fantastic.
But mostly I love Clojure. It’s a new, redone Lisp. It’s web aware. It knows that Code = Data. Hurrah!
Now, Lisp has always been my favourite language but with the advent of Common Lisp I began to despise it. It became verbose. Horrid to code in. What was elegant became ugly, unnecessarily so. I moved onto Scheme as it retained the simple elegance that was the original Lisp implementations. However, Scheme had a fatal flaw: you had to write a lot of support code. It reminded me a lot of Pascal, elegant but not as library rich as C. Clojure solves that problem — as does Arc to a lesser extent. With Clojure the elegant simplicity of Lisp has been rediscovered and Clojure, built atop the JVM, means developers have complete access to all the Java libraries out there without having to code in Java. Bonus!
I’ve noticed that the interest in Clojure seems to be increasing. I see more and more mention of the language and I think maybe, just maybe, people are starting to comprehend what John McCarthy was on about more than 50 years ago.
So I have hope that programming will get more “fun” as we eliminate the verbosity and allow Code to be equivalent to Data.
Here’s to the end of programmatic verbosity.
For those who enjoy a good motivational poster, here’s one from Xach’s Journal. Enjoy.
