Consider the following code block:
What I typed in markdown was the sequence of bytes
0x61 0x09 0x62 (pretend Unicode doesn't exist). The middle character is a tab.
But as you can see in the rendered output, the tab is converted into a sequence of
0x20 spaces. This is problematic for languages with significant whitespace. No, I'm not talking about Python (where tabs and spaces are both usable for indentation), but neither am I talking about silly esolangs like Whitespace.
I'm talking about MUMPS, a real language that people use (yes, really!), in which tabs are a syntactically-significant construct. Consider the following MUMPS code:
timesTwo(x) set y=x*2 write y quit
In order for this to be syntactically correct, lines 2 and 3 must start with a
\t, and the
set on line 1 must be preceded by a
\t. As is, you cannot copy-paste the code block above from this post into a MUMPS routine and have it work, since the tabs are converted to spaces when the markdown is rendered to HTML for display.
Now, I'm willing to believe that there may be benefits to users of other, less-awful languages that outweigh the issues this causes with MUMPS, but I don't know what they are. Why do we have this auto-tabs-to-spaces conversion thing going on?
(Context: I was trying to figure out why I was having issues with this PPCG post.)