> I am wondering if from the TW code "point of view", tagging a tiddler
> with A, B and C is different from tagging it B, A and C. In other
> words, does the order in which tags are added matter ? Can it bring
> useful possibilities ?

Tiddlers tags are stored as an arrays within the tiddler runtime data,
and as space-separated strings of tags in the storeArea written to the
file.  There is no automatic sorting of the tags, so the order of the
tags for any given tiddler is based on the order they were entered
into that tiddler.    Thus, it is *possible* to write code whose
results are based on the order of the tags... but I don't think it is
a good idea.

Here's why:

Current TW code typically invokes tiddler.isTagged(),
tiddler.tags.containsAny(...), or tiddler.tags.containsAll(...)
functions to determine if a tiddler is tagged with a specific tag or
tags, regardless of the *order* in which those tags occur.  However,
there are a few functions that 'loop through' the array of tags, so
that it is possible that the 'natural' order of the tags can effect
the result, though it would probably not be intentional and, with a
few exceptions here and there, it would most likely be considered to
be a bug in that function.

>From a semantic usage standpoint, relying on the order of the tags
could be really problematic: it's just too easy to add a tag 'out of
order' when editing the tiddlers, which would then cause a different
result to be produced when the tags are processed later on... and, if
the difference is subtle, it might not even be apparent that an error
in the order of the tags is responsible (or even that the wrong
results were reported).

-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to