[plt-scheme] Contracts on Structures vs Guards
Hi all,
I am wondering if there is any difference performance-wise between
defining a guard on a structure and defining a contract on the
structure.
I am I correct to say that the contract on the structure is only
checked in module boundaries while guards are always checked when the
structure is built and therefore having contracts would always be at
least as fast as guards (when assuming that guards are only used to
check the types of values)?
Contracts are also probably the recommended style, right?
Cheers,
--
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net