Ted Neward wonders...
Is Ruby the next Lisp? And if so, does that make Ruby a "second chance" for widespread acceptance for Lisp?I would not say Ruby is the next Lisp. Rather, Ruby is one of the most recent Lisp-like languages. Python is a Lisp-like language going back a decade or whatever longer.
Smalltalk is even a Lisp-like language, as has been noted recently, and Kay states Smalltalk was directly influenced by Lisp. (pdf)
Can I learn to be a better Ruby programmer by learning Lisp, or vice versa?Yes. For that matter, one can learn to be a better C programmer by learning Lisp. Or Ruby.
If one of Lisp's strengths is writing programs to write programs, does that make Lisp a natural candidate for building DSLs?Absolutely. And has been in practice for 40 years or more. Literally.
And, again, if the Ruby == modern(Lisp) equation holds true, does that make Ruby a candidate for building DSLs?Ruby would not be *bad* for building DSL's. The difference with Lisp is the syntax and syntactical tools are not as good for doing this in Ruby as they are in Lisp.
DSL's are best built in Lisp and Smalltalk, somewhat less so in Ruby and Python. But Ruby and Python programmers could argue that pretty well with me. I think I know both of them pretty well but not so well as to say I know I know both of them pretty well.
2 comments:
Rather, Ruby is one of the most recent Lisp-like languages. Python is a Lisp-like language going back a decade or whatever longer.
For what it's worth, Ruby is around 12 years old. Not that this make it any more or less Lispy, of course. (Though it's arguably Lispier than Python)
Even if python and ruby may be seen as lisp-like languages, they deeply differ from lisp in that they disallow addition of new syntax or language structure.
Indeed, lisp macros are at the same time a boon for any DSL developper (they make it rather easy to develop new languages) and a nightmare for other users/developpers as they see new features and implementation of the latter popping (lazy evaluation, object system, array facilities with macros) without a natural standardisation.
Python (and I guess Ruby too) avoid that in their core language with a BDFL and a community that do care to choose only one elegant and pragmatic solution.
In fact, Lisp has probably too much expressiveness and freedom (but it is also tremendously appealing :-)
Seb
ps: Notice that python as the same problem as lisp but in the realm of "web frameworks".
Post a Comment