TiddlyWiki: my view of "<<...>>" , variables, and macros

I do not like the label "variables" for TiddlyWiki variables.

I also do not like the label "macros" for TiddlyWiki macros.

Now that I have yanked those words out of the picture, let me explain with my TiddlyWiki vocabulary the purpose of the "<<" and ">>" delimiters in the context of "<<...>>".

When something is wrapped in those delimiters, it tells TiddlyWiki to process the thing as a reference to a named value that has been previously defined, versus treating the thing as any regular text.

When that something is rendered (upon first display, or upon refresh via some trigger), or referenced in some action, the value reference (i.e. the "<<...>>") is replaced with the related value.

Really, <<...>> does the exact same thing as {{...}}:

Both <<...>> and {{...}} perform transclusions.

Both of these are references to some value (however big or small) and both of them get replaced by their related values.

Whereas "{{...}}" is for the transclusion of some value in some tiddler field, "<<...>>" is for the transclusion of some value that has been defined via a "widget" (some examples: set, vars, and let widgets) or a \define pragma.  Some example widgets: $set, $vars, $let.

When "<<...>>" has nothing else between the delimiters but an identifier (i.e. the name related to a value), we have a simple transclusion of the related value.

When "<<...>>" has more than just an identifier between the delimiters (i.e. the identifier is followed by space-separated words we call "parameters", we have a parameterized transclusion.  Parts of the value  related to the identifier will be substituted with the values of the parameters.

So that's how I view "<<...>>", and that's the vocabulary I use related to that transclusion.

No comments: