[plt-scheme] Calling scheme_loaded functions

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Wed Mar 10 11:10:30 EST 2004

At Wed, 10 Mar 2004 09:08:19 -0700, Richard Cleis wrote:
> Which is faster, scheme_eval_string( "(f 1 2 3)" ) or...
> building an argument list with scheme_make_double and somehow using 
> scheme_apply?

Using scheme_apply().

> I am not sure I can ask the above question since chapter 6 reads:
> 
> "The functions scheme_eval_compiled, scheme_apply, etc. provide the 
> same functionality without starting a new top-level evaluation; these 
> functions should only be used within new primitive procedures."
> 
> By "new primitive procedure", it appears that only functions made with 
> scheme_make_prim_etc can be used with scheme_apply.  Is this true?

You've overlooked a leading "_". The docs actually say

  The functions _scheme_eval_compiled, _scheme_apply, etc. provide the
  same functionality without starting a new top-level evaluation; these

Don't use _scheme_apply(), but scheme_apply() is fine.

Matthew

P.S. - I added words to the documentation to point out the underscore.



Posted on the users mailing list.