From: Tamas K Papp on
On Mon, 03 May 2010 16:58:11 +0000, Peter Keller wrote:

> J Kenneth King <james(a)agentultra.com> wrote:
>> grucidipo <gruzcidol(a)yahoo.es> writes:
> [snip]
>
>> I cannot abide the "construct a new language" argument.
>>
>> Macros are a part of Lisp. They don't modify the language of Lisp.
>> They don't create new languages inside of Lisp.
>
> So, here's a question:
>
> Using macros, can one implement a reasonable syntactic and semantic
> subset of python? (And I don't just mean writing a python compiler in
> lisp, but using lisp to change its own definition).

You would need read macros for the surface syntax. If you allow read
macros -- which, despite the name, have nothing to do with what
lispers usually call macros --- then the answer is definitely yes.

Why one would want to do it is another question, though :-)

> Or does one mean "construct a new language" as a DSL in the lisp
> syntax?

Usually, DSLs retain the S-expression syntax for practical reasons.
Lispers are already used to S-expressions, they integrate well with
the rest of Lisp, and the editor/IDE supports them nicely.

That said, I find the argument about whether complex DSLs are "new"
languages completely academic. The answer is a matter of definition
(what qualifies as "new"?), and it makes no difference when it comes
to writing and applying these constructs. Thus it belongs in the same
category as the other pointless staple arguments (Is X a lisp? Is X a
functional language? ...).

Best,

Tamas