[stringtemplate-interest] null vs missing vs empty vs nonexistent
gwlist at grahamwideman.com
Thu Oct 15 14:25:43 PDT 2009
At 10/15/2009 01:56 PM, Terence Parr wrote:
>was thinking about that but figured it'd confuse. we have <if(!foo)foo
>is missing<endif> anyway.
...though ! appears to have two problems for detecting the missing case: it doesn't distinguish between FALSE and null (and missing if missing is legal here), and docs I think probably aren't clear on whether the missing case is legal and treated like null, or should cause error.
Generally I think if you establish missing as a concept distinct from null, then to minimizing confusion means that everywhere those concepts arise they should get distinct treatment (eg: parallel options in render).
This of course runs into trouble applying boolean operators to what is now becoming a 4-value situation: true-val/false-val/null/missing --> true/false/maybe-error.
No time as good as a new version to take a stand though!
(BTW, are you really saying there are also empty and nonexistant cases?)
>On Oct 15, 2009, at 1:53 PM, Graham Wideman wrote:
>> If you're worried about whether the missing case should or should
>> not be treated like null, might you consider a missing="something"
>> option to parallel null="something"?
>> -- Graham
>> At 10/15/2009 12:25 PM, you wrote:
>>> Ok, we have an important choice to make. Thanks to Bill Venners were
>>> bringing this up last year. It's important enough and long enough
>>> I added to my blog:
>>> Here is my summary from the bottom of the page:
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
More information about the stringtemplate-interest