On 10/30/2020 1:14 PM, William J. Bowman wrote:
Thanks! One follow-up:

> 1. make these functions, not macros
The main implementation is a procedure, but I think I need a macro to get the
syntactic interface I want.

Is there some reason to avoid macros?

You certainly can use macros in the implementation, but just remember that macros evaluate at compile time and most contracts have to be checked at runtime: so a contract can't *exclusively* be a macro ... runtime code has to be generated.

Robby's comment about code size is relevant also:  contracts are not debug mode only like assertions in C ... Racket's contracts live on in release mode compiles, so you want to minimize the amount of runtime code required to implement them.

George

--
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/5f5fecff-01f9-5f66-1ffe-4486de354199%40comcast.net.

Reply via email to