Re: Minimal keywords needed for constructing a full CL system
- From: Don Geddis <don@xxxxxxxxxx>
- Date: Thu, 06 Jul 2006 09:32:33 -0700
"Rob Thorpe" <robert.thorpe@xxxxxxxxxxxx> wrote on 5 Jul 2006 10:23:
It is not really the minimum set since it does no I/O, as I mentioned
earlier. So unless your prepared to speculate about implementing the whole
universe using lambda
Why not implement the "whole universe" using lambda?
Of course it would be silly in practice, but so is the original question.
If you don't want "just LAMBDA" to be the answer, then you have to ask a
more precise question.
I think what the OP is looking for is the smallest set that meets some very
limited criteria of practicality. That was the sense I answered the
question in anyway.
Yes, of course, but what we're doing here is a kind of Socratic method of
uncovering the answer. We're demonstrating that the original question isn't
a very good one, and suggesting that maybe even the OP's original motivations
are misplaced.
The truth, as many people have already said, is that there is no single unique
canonical "minimal" set of lisp "primitives".
There is the whole spec. It would be possible to implement each function
there directly in some other language (assembly, Fortran, etc.). It's also
possible to implement some small subset of them in another language (perhaps
C), and then the rest in Lisp itself. Pretty much all CL implementations do
this latter thing.
But it is somewhat arbitrary which operations you choose to put in the subset,
and which you choose to implement in Lisp. It is arbitrary for two reasons:
1. There are different possible "minimal" sets, rather than a single
canonical one. Much like you can implement any logical operation either
just using NAND gates, or else just using AND/OR/NOT gates. Either choice
is a fine basis for building up all logical operations.
2. Unlike this theoretical exercise, in practice you need to worry about
efficiency. So an implementation might "primitively" implement many different
functions, even if it is theoretically possible for some of them to be
defined in terms of others.
Conclusion? The theoretical question "what is the minimal subset of Lisp" is
either silly or malformed or useless. "Just LAMBDA" is one possible answer,
likely of only minor interest. It's actually hard to ask a precise question
that gives the kind of answer the OP thought he was looking for.
But what he thinks he's looking for isn't as interesting as he believes it is.
-- Don
_______________________________________________________________________________
Don Geddis http://don.geddis.org/ don@xxxxxxxxxx
Instead of trying to build newer and bigger weapons of destruction, mankind
should be thinking about getting more use out of the weapons we already have.
-- Deep Thoughts, by Jack Handey
.
- Follow-Ups:
- Re: Minimal keywords needed for constructing a full CL system
- From: Rob Thorpe
- Re: Minimal keywords needed for constructing a full CL system
- From: Pascal Bourguignon
- Re: Minimal keywords needed for constructing a full CL system
- References:
- Minimal keywords needed for constructing a full CL system
- From: Javier
- Re: Minimal keywords needed for constructing a full CL system
- From: Ari Johnson
- Re: Minimal keywords needed for constructing a full CL system
- From: Rob Thorpe
- Re: Minimal keywords needed for constructing a full CL system
- From: Kent M Pitman
- Re: Minimal keywords needed for constructing a full CL system
- From: Javier
- Re: Minimal keywords needed for constructing a full CL system
- From: Don Geddis
- Re: Minimal keywords needed for constructing a full CL system
- From: Rob Thorpe
- Minimal keywords needed for constructing a full CL system
- Prev by Date: Passing arguments to executable created with clisp
- Next by Date: can-of-worms
- Previous by thread: Re: Minimal keywords needed for constructing a full CL system
- Next by thread: Re: Minimal keywords needed for constructing a full CL system
- Index(es):
Relevant Pages
|