Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

exprvaluenotes
<[ ]>""list is empty, yields empty string
<[ ]; null="x">""list is empty; no null element => no x
<[[ ], [ ]]:{it | <if(it)>x<endif>}; separator=",">""[[],[]] collapses to [ ]
<[ ]:t()>""nothing to apply; template not evaluated
<[ ]:{it | <if(it)>x<endif>}>""nothing to apply; template not evaluated

We recently modified [ ] to mean null, but that is inconsistent with passing in "new ArrayList()", which is non-null but has no elements.  

We also added [ ] to mean "missing" or null in dictionaries. We should either use a literally missing value or more likely just don't add that value to the map. Any missing map entry evaluates to null.

For dictionary d ::= [x:"x"], <d.(x):{it | <it>}> is x and <d.(y):{it | <it>}> is "".

So, to summarize, I 'm not sure why we need [ ] or missing values in [ ] but we can leave that stuff. We have to backout recent changes where [ ] is the default value of nullthink we're ok as-is. I propose that we change null values to count in <i> index expressions if there is a null option in a future version like 4.1 but let's not change it on a point release like 4.0.7.

...