RE: Detecting unbound options

> OK, so maybe I just don't understand Mozer's proposal, but here's
> another, even simpler, I think, suggestion:
> 
>  For each non-required option with no default and name NAME, there is
>  an additional option defined automatically named NAME-bound, whose
>  value is "1" if NAME is bound and "" otherwise.
> 
> This will enable simple use of "if $NAME-bound then ... else 

What Mohammed was proposing was a simple fallback mechanism for the case
when the option is not bound. Personally, I like it more than the
$NAME-bound magic: suppose you have an option named "upper-bound", you
will then have to refer to something like "upper-bound-bound" etc. Also,
what would be the advantage of this compared to the p:bound() function
you proposed earlier?

Regards,
Vojtech

Received on Thursday, 28 May 2009 11:06:56 UTC