Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- From: Joe Marshall <jrm@xxxxxxxxxxx>
- Date: Thu, 07 Jul 2005 09:53:09 -0400
Lars Brinkhoff <lars.spam@xxxxxxxxxx> writes:
>>>>> Peter Seibel <peter@xxxxxxxxxxxxxxx> writes:
>>>>>> Indeed, one of Baker's big points was that when the Lisp
>>>>>> community came to the fork in the road between Interlisp (with
>>>>>> it's structure editor) and Maclisp (with programs ultimately
>>>>>> stored as text in files), they made a mistake by taking the
>>>>>> Maclisp fork.
> [...]
> Peter Seibel <peter@xxxxxxxxxxxxxxx> writes:
>> Joe Marshall <prunesquallor@xxxxxxxxxxx> writes:
>>> On the other hand, I think that it would have been a better idea to
>>> store the structure in files rather than the text. The text should
>>> have been created on the fly for editing purposes.
>> Yes. I'm 100% with you there.
>
> However, is Common Lisp source code, especially with reader macros,
> compatible with structured source files? I've thought about this (for
> several minutes!), and it doesn't seem trivial.
It ought to be. Reader macros have to return objects (or nothing), so
going from text to structure should work if the text is syntactically
valid.
Going the other way might be an issue. When I write a reader macro
for special objects, I try to make sure that the print method for
those objects uses the reader macro. This won't work if the reader
macro returns list structure, though.
-----
In thinking about this more, I'm less sure of what the `right thing'
is. If we are going to store structured data in files, it has to have
some structured representation. A binary format like a fasl file is
easy to load, but not very portable, and you need a running lisp
system to make sense of it.
For a moment, let's pretend XML is useful. We could store structured
data serialized to XML. That would have the advantage of being both
portable and (somewhat) human readable. You could, in a pinch, edit
the structure with VI or Notepad. A validating parser could ensure
that the structure is correct before deserializing it. External tools
could manipulate the structure without interpreting it; for example,
you could use XSLT programs to do simple syntactic code
transformations like renaming identifiers. Enough fantasy. XML is a
bloated mess and a more readable and concise alternative is at hand:
s-expressions.
So Lisp text files already *are* structured. Since the structure
markup uses ascii characters, it is easy to edit the structure as text
without needing a Lisp system to intermediate. A validating parser
for s-expressions is easy to write, and some external tools (like
emacs) can manipulate the structure without interpreting it.
So what's wrong with the MacLisp approach?
~jrm
.
- Follow-Ups:
- Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- From: Lars Brinkhoff
- Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- References:
- Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- From: Lars Brinkhoff
- Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- Prev by Date: Re: Business applications in Lisp
- Next by Date: Re: Martin Fowler talks about Lisp...
- Previous by thread: Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- Next by thread: Re: ILC2005: McCarthy denounces Common Lisp, "Lisp", XML, and Rahul
- Index(es):
Relevant Pages
|