Page MenuHomePhabricator

Use triple-curly as shortcut for subst
Closed, DeclinedPublic

Description

Author: roy

Description:
In [http://bugzilla.wikimedia.org/show_bug.cgi?id=5904 ER 5905] a shortcut for subst was suggested. The ER was rejected on
technical grounds. I suggest an alternative syntax, using triple curly braces to indicate substitution. Thus {{foo}} would transclude
template:foo and {{{fooo}}} would substitute it.


Version: unspecified
Severity: enhancement

Details

Reference
bz8438

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:29 PM
bzimport set Reference to bz8438.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Too simple to confuse it with regular transclusion or template parameters. I
would advise against it. What's the point in implementing a shortcut for
substitution? Is "subst:" really all that difficult to type?

roy wrote:

"Too difficult" is somewhat subjective, but yes, I find it a pain. Obviously the author of 5905 did as well :-)

On the other hand, this is really just a symptom of a deeper problem -- there should not two kinds of templates to begin with.
It's a pain to have to remember which should be subst and which shouldn't. If there is some good technical reason why some
templates should be transcluded and others should be substituted, that information should be kept in one place (like in the
template itself).

ayg wrote:

That's a different bug. See bug 2003. As for the feature request, it conflicts
with parameter syntax ({{{foo}}} is the parameter named "foo" or substitution of
the template named "foo"?), and even if it didn't, it would be syntax bloat in
an already bloated syntax where we already have a perfectly acceptable and
significantly more intuitive (even if longer to type) notation. WONTFIX.