Nor to me.
Tags are the literal origins of CFML. There is no philosophical leap to allowing tags to co-exist within script, the opposite is already true.
Technically we’re already allowing the parser to switch from tags to script in the middle of a template. This minor change would allow the parser to switch from script to tags in the middle of a template.
Crux…
Many developers believe wholeheartedly, resolutely and passionately in the axiom, “TAGS are bad, SCRIPT is good”. They may even be right.
Others (I’m guessing yourself and myself included) have less freedom and are boxed in by the practical reality of our existing practices, code bases, budgets and resources.
No one is advocating for code abuse in any of its forms.
Axiom implies…
It is perfectly legitimate to have <CFSCRIPT>
to allow the creation of a script island in the middle of tags because… TAGS bad, SCRIPT good.
It is not legitimate to have tag { <whatever /> }
to allow the creation of a tag island in the middle of script because… TAGS bad, SCRIPT good.
There is nothing useful a tag can do that could not be achieved by writing the code correctly in script; with the exception of a separate view template.
Pragmatism suggests…
The “Axiom” doesn’t help those of us who are stuck with large code bases comprised of tags.
It is useful to be able to insert script into the middle of these “tag” templates, without having to rewrite everything as script.
It would also be useful to leverage existing tag based code by inserting it into “script” templates, without having to rewrite everything as script.
It would also be useful to manipulate tag based constructs like HTML, XML, SVG, etc in small chunks within script based functions without having to resort to external templates, auxiliary files and/or transformation templates.
Personal opinion…
I support the change, if it can do:
- immediate output
- captured output
- all cf tags
- custom tags
I have no particularly preference for syntax except to say back-ticks… ugh. Anything but back-ticks.