[alexandria-devel] Re: Review cycle 1: binding constructs

Nikodemus Siivola nikodemus at random-state.net
Tue May 27 12:12:23 UTC 2008


I am pretty happy with all of these. (Modulo one s/IF-LET*/WHEN-LET*/
typo I already fixed in the docstrings above.)

Short-circuiting the evaluation in IF-LET* and WHEN-LET* has been
proposed on occasion. I do think it is better not to, because that
complicates the semantics slightly, and also because in the absence of
short-circuiting anyone assuming short-circuiting behavior is going to
notice the problem pretty much immediately, whereas should someone
rely on _not_ short-circuiting, they might not notice the
short-circuiting behavior which I can imagine causing subtle bugs.
...but if someone has a compelling use-case for short-circuiting, I am
happy to reconsider.

The only other thing that comes to mind are declarations, but for
IF-LET and IF-LET* it would make sense to put the declarations between
the binding and the IF in the expansion, while it would be far more
convenient to use a LOCALLY around the body in WHEN-LET and WHEN-LET*
-- but wrong for SPECIAL declarations. I think in cases where
declarations are needed, these constructs are liable to be either too
easy to misuse, or wrong for some cases -- better to not have them
now, IMO. We can always add them later without breaking compatibility
if it turns out people need them.

The tests seem to cover the important bases, and the implementation is
pretty trivial. Not much to go wrong there.

Cheers,

 -- Nikodemus



More information about the alexandria-devel mailing list