From: Nikodemus Siivola Date: 2002-12-18T11:55:12+09:00 Subject: Nature of ruby On Wed, 18 Dec 2002, Gavin Sinclair wrote: > Interesting. How would the following code be compiled? > > code = gets > eval code Into a ruby tuby interpreter that reads it's source from the stdin. Repeat: "Eval is just another function". Lisp does it, so why not ruby? The problem of course is that a minimal ruby interpreter is several orders of magnitude more complex than a minimal ruby interpreter. Most people on this list would be able to write something that could be termed a Lisp interpreter in less than a week from scratch with minor help from literature and other poeples source code -- in C, without lex and yacc. So eval in Lisp is really "just another fucntion". You can fit "Lisp in Lisp" on an A4. I don't think anyone here, Matz included, would be confident in writing a ruby interpreter from scratch in a similar timeframe. This bring to mind another question: could you separate the "language features" of ruby from it's "library features": what would be a minimal subset of ruby that you would be willing to call ruby? -- Nikodemus