by formerly_proven · 5y ago · 0 comments
I've been around the block for long enough to see how far the pendulum swings on this one. I'm guessing that it starts going the other way soon.
It probably won't reduce the intensity of the way a small minority of the community treats the language-level difference in holy wars, though.
Modern static type systems are a totally different beast: inference and duck-typing cut down on noise/boilerplate, and the number of bugs that can be caught is dramatically higher thanks to maybe-types, tagged unions/exhaustiveness checking, etc. I think we've circled around to a happy best-of-both-worlds and the pendulum is settling there.
The type declaration syntax definitely could use some love, I think it's a shame a more convenient syntax was never standardized. And sum types etc would be nice of course. It's all perfectly possible.
However, you have to consider that Common Lisp itself is quite different from other dynamically typed languages.
I find that, after the initial adjustment period with the language (which is significant, I admit), it's surprisingly hard to write messy code in CL, certainly harder than in Python or Ruby. At the very least, the temptation to do so is lower, because there are fewer obstacles to expressing sophisticated ideas succinctly.
And no, I am not talking about the ability to define your own macros and create DSLs. I think it has to do with the extensive selection of tools for creating short-lived local bindings, the huge selection of tools for flow control, and the strict distinction between dynamic and lexical variables.
There's just something about it that sets it apart from other dynamically-typed languages, even without the gradual typing aspect and even without the speed difference. Navigating a source codebase in Python without strict type annotations is like navigating in the dark in a swamp. I don't have the same issues in Common Lisp for the most part.
Maybe this has more to do with undisciplined programmers self-selecting out of CL than it has to do with any aspect of CL itself.
And on top of the excellent and unique language design, you have:
* A powerful CFFI
* An official specification
* The "REPL-driven" development style (if you want it)
* Several well-maintained implementations that generate high-performance machine code
* The unique condition system
* Literally decades of backward compatibility
* A core of stable, well-designed packages, including bindings to a lot of "foundational" libraries
* Macros if you really do want to invent your own syntax or DSL
Probably the only big downside is that the developer ecosystem is still focused around Emacs. That too is changing gradually but steadily, with Slyblime (SLY/SLYNK ported to Sublime Text), Slimv and Vlime (Vim ports of SLIME/SWANK), the free version of LispWorks for light-duty stuff, and at least one Jupyter kernel.
Also, Roswell (like Rbenv or Pyenv) and Qlot or CLPM (like Bundler or Pipenv) help create a "project-local" dev experience that's similar to how things are done in other language ecosystems.
And of course there is Quicklisp itself, which is a rock solid piece of software, and fast too!
Python and Ruby have their own merits, for sure, and there are plenty of things I have in Python that I wish I had in CL. But it really doesn't seem right to compare them, CL seems like a totally different category of language.
For mechanical things where you the programmer are building the abstractions (compilers, operating systems, drivers) this is a non-issue, but for dealing with the ugly real world dynamic is still the way to go.
All this however is rather orthogonal to the strengths of type systems. CL type system, for instance, is stronger than one of Java or C.