YES
I can't downvote the existing no answers enough, so I made a yes answer to try to explain why they're wrong, because otherwise I was just going to have to rant about it to someone.
First up, my premises:
- This suggestion can be implemented in such a way as to make direct
negative impacts on questions negligible.
My reasoning behind this is, you could make the feature something more obscure than a button - thus, only users familiar with the site would even know it existed. Or, you could enable it only for questions that we are reasonably sure that it would not affect (ones tagged with the right language for example).
We could also, as one commenter pointed out, have a button to show the original text:
This would solve the problem for languages like Python where it is common for refomatting to introduce bugs, because the same people who know to look out for those questions know to click that button.
- This suggestion would provide a benefit to users.
This seems so self-explanatory, but just to make it clear: this will save time in at least some (I would argue many) cases, whether for people editing or for people pasting code in. I'm going to leave it there, because that really can't be argued with.
These two are what I'm building my yes case around, but there are some objections that I want to cover which are actually...
Terrible objections
- For language X it would not work
Fine, let's not have it for language X then. As many have pointed out, it can be limited in scope as I outlined above, and in many other ways I am sure.
Next, a couple of variants of the same objection:
- The OP should clean up their own code
- This promotes lazy answers
These are just the worst. First up, *just because this button is there doesn't mean you can't let the OP know their code sucks.
"Oh, but it'll seem like we're just being nit-picky because it's so easy for us to just click those three buttons needed to tidy it up ourselves"
Why yes, yes it will.
As for promoting lazy answers, it sure doesn't. If the OP was going to be lazy in the current system they just wouldn't format their code. Now, they can be lazy and come out with a high-quality question/answer (potentially)
If it's still too low-quality, then actions can be taken to fix it, but otherwise hey, we've just made someone who with the existing system would not contribute effectively into someone who does contribute effectively. Gosh, what a terrible result.
Just to rub it in a bit, consider my paraphrased version of that same objection:
- It's good for the soul to do pointless work turning tabs into sets of four spaces instead of just pressing a button to do it for us.
Yeah, no.
"Oh, you are so right Jeff, we shall all bow to you because you are so right and because you have the same name as our illustrious founder"
Hold your horses. There are some legitimate objections to be raised. Funny that no one has raised them yet though, that kind of sucks. So:
Legitimate objections
- The visual clutter will reduce usability more than the new feature will help
Ok, sure, I'll accept that that's possible, though I don't know for sure. You'd have to ask a UX designer. If that is relevent, then make it hidden, like a key-combination (ctrl-k-d anyone) that only people who know how to use the site know exists, but still makes life easier for the most valuable members of the community.
"Hang on, if we make it hard to spot then..."
- The gain for this feature while making it so obscure does not outweigh the cost to implement it
Again, I can't speak to this. we'd have to get someone who knows what it would involve to weigh in, but it's certainly not something I would use as an objection right off the bat...
convert tabs to spaces
"-function would already be a huge help.tab-size
(and-moz-tab-size
) to 4?tab-size
to 35 and make it glaringly obvious that there are tabs. Lots of newbie Haskell bugs are caused by people failing to realize that using tabs is a Bad Idea.