On Thursday, July 27, 2017 at 9:01:11 AM UTC-4, Matthew Flatt wrote: 
> Declaring (as opposed to instantiating) a compiled module will normally
> not raise an exception. Probably it's possible to construct a set of
> embedded modules where there will be a declare-time error due to
> conflicting or missing declarations, but I don't see how to make that
> happen only sometimes.

Good to know.

> The escape-catching pattern is needed anywhere that you don't want to
> just exit/crash.
> 
> You can certainly call multiple `scheme_...` functions within a single
> escape-handling block, including multiple calls to `scheme_eval_string`.

Also good to know, thanks.

On Wednesday, July 26, 2017 at 11:09:48 AM UTC-4, Matthew Flatt wrote:
> At Wed, 26 Jul 2017 07:54:32 -0700 (PDT), Thomas Dickerson wrote:
> > One more thing: in terms of repeatedly executing scripts, does it make 
> > sense 
> > to set up and tear down the interpreter every time? Or just swap in a fresh 
> > namespace?
> 
> Between those two options, a fresh namespace is almost certainly
> better.

For posterity, it's worth noting that you can use the Boost Coroutine library 
to implement this in C++ in a nice object-oriented fashion to make a loop that 
executes Racket tasks in a way that doesn't require bouncing your `main` 
through `scheme_main_setup` or equivalent, which is great if you're embedding a 
racket interpreter to be reused as an API rather than a one-off program.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to