I am working hard to come to terms with the changes in TiddlyWiki 5.3.0, I am however now trying to understand the use of and features of procedures, especially in contrast to macros \define
.
Consider this example;
\procedure myproc()
<$parameters name={{$:/SiteTitle}} desc={{$:/SiteSubtitle}}>
This is <<name>> demonstrates <<desc>>.
</$parameters>
\end
<<myproc [[aTitle]]>>
- note if you change
\procedure
to\define
it is inter-changable, the use of the new $parameters works in both, even if you don’t (name) your parameters.- This ability to not name parameters may prove useful, but how.
- In procedures the parameters are available as variables ONLY
- In a macro we can now still access the parameter using the form
$param$
as long as it’s named in the macro parameters (but not in procedures).
I belive there are technical reasons to avoid the old substitution methods $param$
, and the new uses of the backticks is useful, but these are limited.
- They only work as attribute values
The use of procedures needs to be considered alongside other 5.3.0 features like translations but transclusions are possibly a subject for another day.
Please help me !
- Help me understand any features, I have missed and what is the key use of procedures?
- How best do we start doing concatenation in procedures?.
- How best will we deal with text that is camel case in parameters with procedures? (and the old macros for that matter),
- must we still use the $text widget?
- If there are performance issues or some other problem with using old macros can we please find a simple and accessible way to describe under what circumstances they should be avoided and why.
- This will also help us decide when to refactor existing code.