Forum OpenACS Development: Response to Is there a right way to deal with booleans?

Posted by Tilmann Singer on
Both versions: <if foo nil> and <if @foo@ nil> work. There is a regsub in the templating code (tag-procs.tcl) that converts &#34;@foo@&#34; to &#34;foo&#34; if necessary before evaluating it with info exists.

The <if foo nil> variant makes more sense to those familiar to tcl, but <if @foo@ nil> is somehow more coherent with the special syntax that&#39;s used in the templates (simply everything within @&#39;s is a variable), and certainly is easier to explain to people not familiar with tcl.

Which of those version is the &#39;right&#39; one is hard to answer without docs, and besides the demo and the examples in that page: /doc/acs-templating/tagref/if.html I did not find any hints on this. I&#39;d rather vote for the <if @foo@ nil> variant though, because of the easier-to-explain-to-non-tclers advantage.