I see from TW official docs and codes, it usestv- prefix for variabletc- prefix for some CSS selectors
I have followed recent discussion on naming the fields or tiddlers in the Google Forum! I wish to know are there recommendations for this?
There are some restrictions for tiddler field-names.
- field name
I am not sure but I assume Tiddlywiki does not have support for namespace! but I see TW honors scope of variables!
I have followed recent discussion on naming the fields or tiddlers in the Google Forum! I wish to know are there recommendations for this?
- variable name
- by $set
- by $vars
- by $list
- by $wikify
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8f429e9b-cb56-45b3-bfff-d192f091f904n%40googlegroups.com.
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/dcae536e-7db2-4bc8-91f3-0b90c2484d2en%40googlegroups.com.
For code in development, readability should be preferred. Larger production scripts should be minified.
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAKHVXmqmwSkk%2B5Zq%3D81voVE%3DJQVM6U11ucpaLpbw14YCRhUD7Q%40mail.gmail.com.
On Wednesday, May 5, 2021 at 4:53:25 PM UTC+2 Atronoush wrote:I see from TW official docs and codes, it usestv- prefix for variabletc- prefix for some CSS selectorstv- ... tiddlywiki variabletc- ... tiddlywiki classtm- ... tiddlywiki messageThese prefixes are reserved for "the core". Users, especially plugin authors should avoid to use them. .. They should only used, if pull-requests for the core are pushed to github.
I personally use, wltc-, wltc-, wltm- ... wl .. for wikilabs ... So I know they are part of a plugin, but my users will still get, what they are used for.-m
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9354a29a-d11e-405a-bf1c-1c660a70cc51n%40googlegroups.com.
On Wednesday, May 5, 2021 at 4:53:25 PM UTC+2 Atronoush wrote:...I am not sure but I assume Tiddlywiki does not have support for namespace! but I see TW honors scope of variables!We do use the term: "namespace" .. but probably in a different context as you mention here. eg:$:/temp/ ..- Is a namespace for temporary variables, which don't trigger an automatic save- Such tiddlers are used like "variables" in other languages.- They are easy to filter eg: {{{ [prefix[$:/temp/]] }}}
The "Explorer" shows all the System namespaces. https://tiddlywiki.com/#%24%3A%2Fcore%2Fui%2FMoreSideBar%2FExplorer-mario
--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/46f6a2eb-6640-4b09-91ee-0e09f6884f42n%40googlegroups.com.
But as I wrote: The most important thing is "good names" ... which is the difficult part ;)
mario--
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 tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8f429e9b-cb56-45b3-bfff-d192f091f904n%40googlegroups.com.
It Seems Tiddlywiki has a total liberty in naming rules.Open Tiddlywiki and put this code in a Tiddler! See all of them world!\define .() test
Hi. This is <<.>>
<$vars
_var =Hi
1var ="Hello"
fr.var ="Salut"
. ="Salve"
)*& = "konnichiwa"
!var = "Olá">
* _var: <<_var>>
* 1var: <<_var>>
* fr.var: <<fr.var>>
* . : <<.>>
* $*&): <<)*&>>
* !var: <<!var>>
</$vars>Strangely (or amazingly!!!) all of them work! You can even name a variable like )*&Is this a sign of pure forgiveness? Or something has been forgotten? Or this is a design philosophy?While most users do not need in depth scripting but I believe most of the above are error prone!What do you think? I think we need some coding conventions? Some good practice at least!
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMAjiKK%2B9Lis-bA1sShFMOLfmu%3DBZAwveDYNqb2tbtH7Cw%40mail.gmail.com.
I see on Node.JS both $:/temp and $:state will be deleted on exit! If one wishes to keep data permanently do you recommendsomething like $:/keep/state?
I think for variables, this lowercase-lowercase-lowercaseis great!for macros, which creates global variables in scope of a tiddler, I prefer your camelCase naming! I think this is better than PascalCase!
I saw a recommendation not to use hyphens and use underscores instead! Especially in Python we cannot do this!
Many other languages do no not allow hyphens, but I see in Tiddlywiki it is quite common and we have the same in CSSlike font-size! So I go for this!
On Thursday, May 6, 2021 at 3:45:52 PM UTC+2 Mohammad wrote:
Strangely (or amazingly!!!) all of them work! You can even name a variable like )*&Is this a sign of pure forgiveness?
Or something has been forgotten? Or this is a design philosophy?
While most users do not need in depth scripting but I believe most of the above are error prone!
What do you think? I think we need some coding conventions? Some good practice at least!
This is absolutely bad practice! I believe TW should raise warning for these specially names like ,
or even the worst case $*&)