From: Mike Gold Date: 2009-02-26T01:19:23+09:00 Subject: Re: Nexus Programming Language 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. >> Without end we could discuss popularity, "naturalness," "well I like >> ...", blah blah blah. But it remains an empirical fact some things can >> be done in lisp which cannot be done in ruby, unless ruby greenspuns its >> own code processor. In lisp you can manipulate code _in code_. > > Right. Like ParseTree. You are supporting my point here. ParseTree only runs on 1.8 CRuby, being tied to the C implementation's AST. If ruby as a language supported a retrievable AST structure, then it could be put alongside dylan as one of the non-lisp languages which supports code as data. But Matz has explicitly decided against this. > I have found Ruby's reflection to be more immediately useful, but I > didn't use Lisp long enough to really be sure. I'm talking about the > more specialized stuff, like define_method and instance_eval. Reflection is different from code-data equivalence. > Actually, I shouted "bullshit!" because a language cannot _prevent_ > thoughts. Most people are surprised when they learn lisp macros. I know I was, and I know many students who were. Why did it surprise us? Because we hadn't thought of that before. It is not that a language prevents the thoughts willfully like a evil demon, it's that the thoughts never arise in the first place. > > The question then becomes whether a language actually makes certain > things impossible, or impractical, or just annoying. And Ruby does have > ParseTree. Not in 1.9 or JRuby. Nor is it planned. Let me know if it happens. > "Power" is subjective. No, not in the way I used the term. Because of code-data equivalence, lisp can do things which ruby cannot. 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. 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. Matz has called lisp "extreme abstraction", which is one way to put it. Lisp allows for more abstractions than ruby. It was his choice to relinquish some of those abstractions, some of that power, in the design of ruby. After all, despite all the catch phrases, ruby is not lisp, by design. -- Posted via http://www.ruby-forum.com/.