Does it really reduce code size to wrap the function instead of explicitly cast? I've always believed that casts are mostly a compiler artifact coming from static typing, didn't usually generate complex code for runtime...

Thanks for your comments,

Álvaro




2012/2/6 Marc Feeley <feeley@iro.umontreal.ca>

On 2012-02-06, at 9:59 AM, Álvaro Castro-Castilla wrote:

> Thank you Marc. Those are all better solutions than my wrapper function.
>
> Best regards
>
> Álvaro

Actually, using a wrapper function is a good idea to reduce code size.  Its intricacies can be hidden in a macro which generates the appropriate Scheme and C code.  I've written something like this in the past and even posted an example to the Gambit mailing list (unfortunately my mail system's search function is broken right now so I can't find the message).

Marc