- Joined
- Sep 17, 2019
Interesting that you bring that up in relation to Java. A thought just hit me: is the JVM a very advanced Lisp machine? Or more correctly, a SECD machine? Something here is scratching at the back of my mind. JVM bytecode is all about stack operations. SECD? Forth? We have to investigate.
Haha, I was wondering when we were gonna finally go full Greenspun's in this thread!But the amount of reflection and dynamic shit you can do on the JVM and the CLR does bring them some fraction of the way to Lisp compared to C++, which is why you can have Clojure and Groovy on the JVM.
Greenspun's 10th Rule of Programming said:Any sufficiently complicated C or Fortran program contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
@cecograph made a good point about the JVM's inability to deal with TCO though. Guy Steele's been talking about this for almost a decade, and I remember Rich Hickey noting that it was one of the issues he had to deal with when making Clojure too (recur and trampoline are useful, but not entirely satisfying, compromises). Still haven't been any developments in that direction yet as far as I can tell.
That's a fair point. I grill Ruby a lot whenever I have to use it for work, but at the same time I have to admit programming in it always feels really fun for me, in almost the same way that programming in Lisp does. It's definitely borrowed a lot from Kay's Smalltalk philosophy of "everything is an object!" (and in Ruby's case, this includes classes themselves, and also the interpreter top-level).On Ruby, I don't think there's anything immediately stupid about being able to add methods to live objects, so long as you get into the Lisp mindset, where Lisp gets to eat the world. Your IDE and debugger should not only be written in Lisp, they should share the runtime with the programs you're writing. You then realise you want a way to add methods to live objects because you want to be able to write IDE, debugging and patching tools that do this, not because it's a sensible way to solve your initial problem. You can still get a feel of this sort of mindset in Emacs.
Your talk of the Lisp mindset reminds me of those old 'war stories' that the early 80-90's programmers tell about how using a Symbolics Lisp Machine was the best development environment that has ever existed on this Earth and that nothing since even compares. Not sure how much of that is just rose-colored glasses, but I almost get second-hand nostalgia hearing how wistful some of these guys get about those machines: