Parameterized Transclusion: Procedure and Macro

Is the below sentence is correct?

From TiddlyWiki 5.3.0 macro is deprecated, so use procedure whenever you use macro except if you need text substitution!

In summary:

Procedure is an improved version of macro in TiddlyWiki 5.3.0 onward!

Areguably It is correct, but could use a slightly different emphasis;

From TiddlyWiki 5.3.0 macro is deprecated, in favor of the more powerful Proceedure’s.

  • There may be some cases where the traditional macro is best for textual substutions until other features are released

However we could show other methods via the function definition to avoid traditional macros in many cases like;

\function mystring(a b c ) [$:/prefix/] [<a>] [<b>] +[join[]]

I think it’s important for deprecations to be very clearly articulated and easy to understand. I think that the current circumstances are too subtle for that to be possible. The deprecation rule would have to be something like “do not use macros unless using textual substitution”. Once we have a replacement textual substitution mechanism then I would hope the rule could become unequivocal: “do not use macros” or perhaps "do not use the keyword /define".

There is a brief note about this in the release note for the prerelease:

The new transclusion architecture is not by itself sufficient to enable us to fully deprecate macros yet. To handle the remaining use cases we propose a new backtick quoted attribute format that allows for the substitution of variable values. See Add support for string literal attributes with textual substitution · Issue #6663 · Jermolene/TiddlyWiki5 · GitHub for details.

2 Likes

Yes! This is correct sentence! Thank you, Jeremy!