Forum OpenACS Development: Re: Language lawyering

Collapse
5: Re: Language lawyering (response to 1)
Posted by Don Baccus on
Note that your rewrite still depends on the implicit "expr". The correct way of writing it to not depend on this implicit call would be:
if { [expr { $n_seconds == 24 * 60 * 60} ] }

ain't none of us goin' to start writing:

if { [expr { [string is true $foo_p] } ] }
in all of our "if" statements ...
Collapse
9: Re: Language lawyering (response to 5)
Posted by Andrew Piskorski on
Don, of course a Tcl if statement does an explicit expr, I never said that was bad. Most of the code I've read or written tends to use that solely to check boolean truth values though, not to do a much math, which is why I figured maybe it was a style faux paux. [shrug] Wouldn't be the first time I've been wrong.