Minimum set of primitives?

Byron Davies
Wed, 18 Mar 1998 07:31:55 -0700

It would be hard to do without I/O and the ability to create primitive,
efficient representations, such as for numbers.


>Chris Hanson wrote:
>> I remember something about there being seven primitives...
>In terms of special forms (syntax), all of Scheme is syntactic sugar for:
>	lambda, a conditional (case is my preference), set!, quote
>To create any definitions, you will have to add define.  And if you
>want to be able to define the rest of the syntax using macros, you'll
>need define-macro (or equivalently, a function that returns a value
>that define recognizes as a macro).  Some scheme compilers (including
>Steele's Rabbit, and my work) convert everything into this subset and
>then optimize the bejezuz out of it.
>In terms of primitive functions, there are probably at least 30, even
>if you were being rigidly minimalist (for very little benefit, I
>A minimum set:
>	eq? = < + - * / quotient car cdr cons truncate set-car! set-cdr!
>	inexact->exact (and other transformers)
>	string functions (or a way to get inside a string)
>	vector functions (at least a minimal subset of them)
>	pair? list? number? procedure? (you could define most predicates in
>		terms of a get-tag, or some-such, function)
>	some more that I'm probably forgetting.