Re: Growing a data type?
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Fri, 31 Oct 2008 16:02:46 -0400
In article
<ea699e19-00ba-4aa6-a976-395cbf4c97f2@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Ali <emailaliclark@xxxxxxxxx> wrote:
Hi,
Just watched Guy Steele's Growing a Language (http://video.google.com/
videoplay?docid=-8860158196198824415), very impressive.
Lisp got plus points for being able to abstract both abstract syntax
and function calls.
Here's a (hopefully) fun question: If Lisp didn't have a string data
type already, could you grow one which was indistinguishable from the
standard implementation, including double quote delimiters?
You could do it using CLOS. You would define a STRING class that held
the data, define a PRINT-OBJECT method that prints it using double quote
syntax, and a read-macro on double-quote that constructs new strings.
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- Growing a data type?
- From: Ali
- Growing a data type?
- Prev by Date: Re: Symbol clashes: how to avoid them. Part 2
- Next by Date: Re: How to Get Started?
- Previous by thread: Re: Growing a data type?
- Next by thread: Online Programs Lisp
- Index(es):
Relevant Pages
|