Agreed, we should have such documentation, and it should be easy to understand and easy to read.
I am not an expert in this, so do take the following with a grain of salt
“Pragma” itself here is not the issue. \define ...
is a pragma, \whitespace trim
is a pragma. \rules ...
is a pragma. Pragmas are simply instructions about how subsequent wikitext is handled. procedure...
, parameters...
and function...
are the newer pragmas that you’re probably referring to.
Although \define
is listed as deprecated, it’s not going anywhere… probably ever, but certainly not before TW6. Tiddlywiki puts a premium on backward compatibility.
However, \procedure...
is a more flexible, more capable version of the same idea: a named template to create wikitext from parameters and the current context. There are some real differences between \procedure ...
and \define ...
. But many macros can simply be updated by replacing the word "define"
with the word "procedure"
and many others only need an additional switch in how they refer to variables, a very mechanical change. (Note that this is many and not all!)
\parameters ...
is a helper for procedures (and I believe it also works with macros too.) If things are working well for you without it, there’s little reason to even consider it. But it offers some additional flexibility, in the same way that <$let>
improved on <$vars>
, allowing one parameter’s default value to be defined in terms of earlier named parameters. But you can easily ignore this unless and until you find a real need for it.
function ...
is different. It’s the same idea of dynamically building something based on the current context and parameters. But instead of building wikitext meant to be displayed, they’re used to build filters. This offers some nice new flexibility. But again, if you don’t currently feel the need, there’s no particular reason to investigate them. At the very least, they will not be replacing your macros; they’re designed for a different job.
The bottom line is simple: Yes, these need to be better documented. But you can ignore them as long as you like, using technique you already know well. When you’re ready to try them, upgrading should not be hard.