Maybe the name is not the more intuitive, but the Javascript code is clear 
: [all[current]] doesn't iterate each tiddler (as all[missing] or 
all[orphans] do), it simply returns the currentTiddler variable if it 
exists, and an empty list if it doesn't. While [is[current]] without any 
selector implicitely iterates over all[tiddlers] (and so, the selection of 
tiddlers will become empty if the currentTiddler happens to be a pure 
shadow tiddler).
I think is[current] only remains for backward compatibility, I've never 
seen it used where all[current] wouldn't do the job.

But <currentTiddler> is clear, and can be used instead of all[current] with 
similar performances (maybe only a difference if there is no tiddler in the 
currentTiddler variable, but I don't think so), so pick the one you prefer 
:)



Le mardi 27 juin 2017 19:23:14 UTC+2, Danielo Rodríguez a écrit :
>
> To be honest, for me the current API is quite confusing.
>
> all[current]  seems odd to me. Makes me think I am going to iterate all 
> the tiddlers just to get the current one. Which is more or less what I 
> though is[current] does.
> In the documentation we should make clearer that is[current] to select the 
> current tiddler is discouraged.
>
> Regards
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3f7b8efc-6c06-4e86-97cb-ace8682d4142%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to