[Developers] do true/false/yes/no need to be quoted?

Jonathan Thornburg jthorn at aei.mpg.de
Sat Jun 4 06:03:14 CDT 2005


Hi,

Another issue that we might usefully clarify involving parameter-file
syntax, is the quoting of the Boolean literals
   true   yes
   false  no

 	<half-baked mode>
 	In honor of all the German government funding that's
 	gone into Cactus development, should we also allow
 		ja	nein
 	and maybe also the Spanish words?
 	</half-baked mode>

At the moment we allow Boolean literals to appear either quoted or
unquoted in both ccl files and par files.  For example, current-CVS
Cactus accepts (and properly implements) the following:

 	# param.ccl
 	Boolean SuperDuperMode "should we enable blah blah blah mode?"
 	{
 	} false

 	# foo.par
 	MyThorn::SuperDuperMode = true
 	SomeOtherThorn::SomeOtherParameter = "no"

However, I haven't found any documentation stating that this is ok.


In my opinion, this _should_ be ok, for two basic reasons:

First, IMHO Boolean literals are keywords, not user-defined strings,
so there's no need to quote them.  I find quoting them to be confusing,
but I'm not going to argue for breaking existing par files which do
it that way.

Second, backwards compatability:  There are a *lot* of existing par files
which use unquoted Boolean keywords.  For example, searching the same
set of 2268 par files as in my previous message, I found 4597 unquoted
Boolean keywords (in 1297 par files in 106 thorns, though again some
of these are duplicates due to my having symlinks and multiple versions
of thorns checked out).


If we can agree on this issue, I'll volunteer to document it along with
my already-promised documentation of string-quoting rules.

ciao,

-- 
-- Jonathan Thornburg <jthorn at aei.mpg.de>
    Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
    Golm, Germany, "Old Europe"     http://www.aei.mpg.de/~jthorn/home.html
    "Washing one's hands of the conflict between the powerful and the
     powerless means to side with the powerful, not to be neutral."
                                       -- quote by Freire / poster by Oxfam




More information about the Developers mailing list