I was recently told to use functions to have clearer filters in my code. That’s a good idea.
But it is not so practical when you can’t encapsulate functions within procedure or function. If your tiddler is tagged as $:/tags/macro
these functions will be exported to the outside, which can lead to bugs elsewhere. And that’s not clean anyway.
Short of that, we could have functions/procedure that would not be exported even if they should have. For instance, we could have functions or procedures whose name begin by private.
not be exported. That would be easy enough to implement (in the senshttps://talk.tiddlywiki.org/t/inputting-a-function-into-a-function/8404e that many things would be left unchanged) and give nearly all the things I was asking for.
Besides,exporting procedures with tag $:/tags/macros
is about OK but also functions is not so much. If we required a $:/tags/function
tag, then that would be a way to export all function of a tiddler (which would cover most of my needs and could be used to ban any unwanted export of function, thus achieving my goals with a slight modification of where functions are exported.
Comments welcomed of course. I don’t pretend to be the Owner of the Truth.