I see a problem with lists: there is no difference between an empty list
and a list with one element which has a value of null. That is, the
list "" can either match against nothing (score 0 on a match against "\r";
score 0 on a match against "\r\r"; etc.) or match the empty element
(score 2 on a match against "\r"; score 3 on a match against "\r\r"; etc.).
Is this a problem in practice? Does fuzzball have a policy on how the
list "" should be interpreted?
--
Alfie <alfie@leaflock.homeip.net>
Logged In: NO
Oops, thinko: s/match against nothing/match nothing/
--
Alfie <alfie@leaflock.homeip.net>
Logged In: NO
Oops, thinko: s/match agaisnt nothing/match nothing/
--
Alfie <alfie@leaflock.homeip.net>
Logged In: NO
Another example is {count:\r}, which returns 2, and {count:}, which returns 0.
So "count" considers "" to be an empty list. This can be a bit odd since
{count:{lunique:\r}} returns 0 instead of 1.
So far I haven't encountered any real-world problems due to this ambiguity.
I imagine most mpi users probably don't notice it.
--
Alfie <alfie@leaflock.homeip.net>
Logged In: YES
user_id=9698
This is also the source of confusion over {lremove}'s
behavior, really. Deciding how empty lists vs one-entry
lists containing the empty string behave would clear up the
edge cases for many list functions.