Hacker News new | ask | show | jobs
by SamReidHughes 2349 days ago
Because static typing is important for working productively with medium-to-large programs, because the Lisps have decrepit ecosystems, and because they aren't even good dynamically typed languages either, with the possible exception of Clojure. There is nothing that Common Lisp has, that other languages don't have, that makes it necessary.
2 comments

That‘s a pretty opinionated statement... Could you elaborate on why you think the Lisps aren‘t „good dynamically typed languages?“

And I don‘t think „necessary“ is a good metric when comparing programming languages; „pleasant to use“ or „efficient to write“ strike me as more pertinent (as well as the obvious runtime efficiency questions).

Use of a bad language like C or Java or Emacs Lisp (if that can be called bad) can be necessary -- the best choice.

I don't have a novel explanation of what makes Common Lisp and Scheme bad dynamically typed languages, just the ordinary obvious reasons, so there's no point in writing it out.

Unfortunately, my CS background isn‘t strong enough to see the „ordinary, obvious reasons“. But I do like Common Lisp, so I am rather interested in discovering what bothers you about it?

And as an aside: what makes you call C and Java „bad languages“? (Especially since you are so much in favour of static typing?)

The short version is,

In C it's easy to make mistakes with gotchas like implicit conversions, and nowadays it's archaic, lacking in basic features it could have, e.g. something akin to D's scope(exit) statements.

In Java it's very expensive, in effort and code bloat, to define new types; in general the language actively fights against making well-organized program, or even just moving data around.

With Scheme or Common Lisp, you might look at Clojure or Oz for some inspiration (as well as features we take for granted in Perl/Python/Ruby/PHP/JavaScript) in regard to what sort of features might make a dynamically typed language, even a Lisp, "not bad." Part of it is that statement-based function bodies are actually a good thing, and infix syntax is a good thing. Scheme is just lacking in basic stuff you need, and it relies on tail calls without explicit tail call syntax. And it has call/cc. Common Lisp is bad in detail -- it has all sorts of clever little features, like setf, that don't solve real problems, they solve Lisp problems. And they handle defining and using new types badly, even simple ones like plain record types. Back in the day, CL's advantage was that the competition was so weak. If you gave CL the Python or JS ecosystem today, it would be usable, but that's the nicest thing you can say about it.

False True False False