I’m hoping to formulate some heuristic that I can stick to when writing a procedure that is called in an environment where the variables it uses are already defined.
The following outputs hey hey
:
\procedure inner(arg) <<arg>> <<foo>>
<$let foo=hey>
<$transclude $variable=inner arg=<<foo>> />
</$let>
So what is the reason for using params/arguments at all when the “surrounding variable” is accessible anyway? The use of the params/args make things a lot more verbose.
The only reason I can come up with is that it is perhaps “faster to understand” when reading the code.
Any more reasons?
Thank you!