From: David Masover Date: 2009-02-26T06:21:24+09:00 Subject: Re: Nexus Programming Language Mike Gold wrote: > David Masover wrote: > >> Mike Gold wrote: >> >>> The parentheses are there for power: code is data, data is code. When >>> evaluated as a language only, putting aside external issues such as >>> mindshare, it is an objective statement to say that lisp is more >>> powerful than any language which does not have the code-data >>> equivalence. >>> >> How is it more powerful than any other language which allows reflection? >> Including Ruby, with ParseTree? >> > > Because in lisp, the metalanguage is the same as the language. Tweaking > ParseTree data is different than writing ruby code. In lisp, the two > activities are the same. > I consider that to be a strength of Ruby. It's possible I simply haven't done enough Lisp to miss some obvious cases where macros would be helping. However, all the other metaprogramming (instance_variable_set, define_method, etc) all work pretty naturally as part of the language. The ParseTree stuff, while it makes ParseTree itself slightly harder to learn (as you have to learn how it represents Ruby code), allows the language to be easier and cleaner when you don't need it. Even when you do, I'd argue that ParseTree tends to match the structure that you have in your head for that code, anyway. > Reflection is different from code-data equivalence. > Code-data equivalence is a kind of reflection. >> "Power" is subjective. >> > > No, not in the way I used the term. Because of code-data equivalence, > lisp can do things which ruby cannot. I believe I've shown that either of the following is true: Ruby can do everything Lisp can (ParseTree, etc)... - OR - there are things Ruby can do that Lisp cannot. If we accept that ParseTree counts, Ruby can do everything Lisp can, with the additional point that not all dialects of Lisp have a concept of objects. If we decide that ParseTree doesn't count, then "power" is at least somewhat based on a superficial, syntactical difference when writing functionally-equivalent code. In which case, I can find plenty of things I can do with Ruby syntax that I can't do with Lisp. > In this formal, objective sense, > lisp is more powerful. Even if ruby greenspuns its own tools like > ParseTree, the language will still be different than the metalanguage. Again, a _syntactical_ difference. For this kind of reflection, Lisp wins. For everything else, Ruby syntax is much more readable, at least to me. > Don't take it personally. This fact is well understood. There is no > sense wiggling around it just to somehow respond with a > counter-argument. > Then try responding to that counter-argument, rather than "wiggling around it" by simply repeating your own, and tacking on an argument from authority.