Jump to content

Template talk:Codett

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Template isn't necessary, suggesting redirect to Template:Mono

[edit]

I don't think this template is very necessary. {{mono}} already does most of what this template does, and the one advantage it has over {{mono}}, being able to set a lang parameter for syntax highlighting, is incredibly niche; there are very few cases where you would want to use {{codett}} for syntax highlighting instead of {{code}} or <syntaxhighlight inline="1">.

Because of this, I suggest that this be redirected to Template:Mono. As of right now, all that would need to be done to support the change would be to find an alternative for it in OCaml (if <syntaxhighlight> can't be used instead), and decide on whether to sacrifice the formatting on SAMPL or to find an alternative to keep the formatting. {{Lemondoge|Talk|Contributions}} 17:39, 22 August 2020 (UTC)[reply]

Absolutely not.
{{mono}}: This template should be used where the content is being rendered in monospaced text for purely stylistic/display reasons, where this display has no particular semantic significance.

It should not be used to indicate source code, nor for variables or variable input (use {{code}} or <code>...</code> for code and {{var}} or <var>...</var> for variables). For keyboard or samples, use <kbd>...</kbd> or <samp>...</samp> respectively.
19:55, 22 August 2020 (UTC) — Preceding unsigned comment added by Paradoctor (talkcontribs)
But also note: It is a replacement for <tt>...</tt>, which is an obsolete element under HTML5. Both this template and Mono exist for approximately the same purpose. Someone reading an article usually won't be able to tell the difference between codett and mono, so if you don't use the lang= parameter in codett, it'd be reasonable for it to share the same use case of mono (stylistic). But in this case, if someone is editing the article, the title "codett" doesn't make sense, because it isn't referring to code. Thus, Mono should be prioritized over Codett if they are in the same territory.
In the case of where it codett actually being used for code: {{mono}}: It should not be used to indicate source code, nor for variables or variable input (use {{code}} or <code>...</code> for code...; If we still aren't using the lang= parameter, then we're in the wrong territory — Mono isn't meant for use for code, so this should also apply to language-less codett. Thus, Code should be prioritized over Codett if they're in the same territory and the lang= parameter is not set.
This leaves with one last spot for codett - when the lang= parameter is set. The one niche use case I was talking about was formatting. You can use it to create pseudo-<syntaxhighlight> tags and still format the text inside it, which is how it is used in OCaml and SAMPL. But, the name still doesn't really make sense; here, the "tt" in "codett" doesn't fit, because we're not using it to imitate <tt>...</tt> anymore. So, if this isn't going to be merged with {{Mono}}, then perhaps it should be moved somewhere where the name makes a bit more sense contextually. {{Lemondoge|Talk|Contributions}} 21:50, 22 August 2020 (UTC)[reply]
"Both this template and Mono exist for approximately the same purpose."
No. Not at all. Their use cases exclude each other. Code and codett are {{semantic markup templates}}, mono is not. Mono can never be used in place of code/tt, and vice versa.
I don't understand your problem with the template's name. It was created as a drop-in replacement for cases in which tt is used to indicate code, avoiding formatting issues that are caused in same pages by the use of the default formatting applied to {{code}}.
If that's the extent of your pain, pick a name you prefer and redirect it here, or move here to there after replacing all uses of codett with the new name, if you find that a productive use of your time.
Paradoctor (talk) 22:50, 22 August 2020 (UTC)[reply]