[bitc-dev] Comments on conditional execution in Bit-C spec
James Graves
ansible at xnet.com
Fri Feb 10 14:49:01 EST 2006
One thing that annoys me with Scheme is if you have a form like this:
(IF foo bar)
If foo evaluates to #f, then the form returns #{Undefined} or such,
depending on the implementation. It looks like the else part of the IF
form is required, and I like that.
An idiom I use in Scheme is something like:
(define (myfunc e1)
(if e1 (do-this) (do-that)))
So if e1 is anything except #f or '(), (do-this) will be evaluated.
Will the conversion stuff in the type classes be set up to handle things
like this? Or will it be necessary to do something like:
(if (not (null? e1)) (do-this) (do-that)) ; or whatever specific test
Thanks,
James Graves
More information about the bitc-dev
mailing list