On Wed, May 5, 2021 at 10:35 PM PMario <[email protected]> wrote: > On Wednesday, May 5, 2021 at 4:53:25 PM UTC+2 Atronoush wrote: > >> 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 >> >> > Good question. ... The universal answer. ... It depends ;) > > I think the most important thing is, that you use _good_ names, that > explain "*what they do*" or "*what they contain*" > > What I use for variables: config-title, config-filter > > eg: > > \define getConfigTitle() $:/temp/$(currentTiddler)$ > > \define config-filter() [tag[config]] > > <$list filter=<<config-filter>> > > <$macrocall $name="a-macro" title=<<getConfigTitle>> /> > <<currentTiddler>> -> <<getConfigTitle>> > </$list> > > If a tiddler title is dynamic and I need to build it with at macro I use > getConfigTitle() for the macro. So I know, whenever there is a > getSomething() there will be variable substitution involved > <https://tiddlywiki.com/#Macros%20in%20WikiText:%5B%5BMacros%20in%20WikiText%5D%5D%20%5B%5BMacro%20Definitions%20in%20WikiText%5D%5D>. > ... > > For other variables I prefer lowercase-lowercase-lowercase to increase > readability and I don't have to think about "case". >
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 CSS like font-size! So I go for this! > > But as I wrote: The most important thing is "good names" ... which is the > difficult part ;) > Yes, this is very difficult! > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywiki/8f429e9b-cb56-45b3-bfff-d192f091f904n%40googlegroups.com > <https://groups.google.com/d/msgid/tiddlywiki/8f429e9b-cb56-45b3-bfff-d192f091f904n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CAKHVXmpnxxhTiea0gXfQhena9gfAxdPYvw%3Di9rD-b_%3D2T_mwFg%40mail.gmail.com.

