Re: Why are both PRIMITIVE and SCM defined?

From: Erick Gallesio <>
Date: Mon, 06 Nov 1995 08:54:15 +0000

> Jason Riedy writes

> I'm just wondering why both PRIMITIVE and SCM are defined;
> syntactically they're the same thing, and they're used interchangably
> in a few places...
> Are they just sugar, or should I worry about an intended semantic
> difference? I like having both, as PRIMITIVE stands out nicely in
> extension code, but there are instances of SCM in the "wrong" places.
> For instance, the type of apply_fct in STk_extended_scheme_type is SCM
> when, IMHO, it should be PRIMITIVE.
They are the same in effect. I use PRIMITIVE when the function is available in
the Scheme world and SCM when this is a function which is not "exported" to
the user. Generally a PRIMITIVE function controls its argument since user can
pass nearly everything as parameter, whereas SCM suppose that arguments are
well formed. For instance in eval.c we have

        SCM STk_eval(SCM x, SCM env);
        PRIMITIVE STk_user_eval(SCM expr, SCM env);

The former is the eval proc used everywhere in the interpreter and the latter
the user procedure which verifies if second arg is an environment.

Of course, since they SCM and PRIMITIVE are the same, it is possible that
there are some places wher one is used for the other ...

> Jason, who's trying to convince all the Tcl/Tk weenies here to try STk...
I know that it's a hard task .....

                -- Erick
Received on Mon Nov 06 1995 - 08:54:16 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST