It would be helpful to have a quick and easy language selector to specify the primary programming language used in a post.
In theory, this should be unnecessary, because Stack Exchange has a wonderful tagging system, and often, languages can be inferred from the tags. I find that in reality, however, most of the questions I write are language agnostic in principle, yet do contain code snippets. Unfortunately, the tags can't indicate what that language is.
I write questions just infrequently enough that I can never remember the syntax. So I click the little help icon, click on "advanced help", Ctrl+F for "syntax", copy and paste something close, and then edit to suit.
It would be great if the process was much quicker and easier. Besides saving time, I think it would encourage more posts to have syntax highlighting displayed correctly, making for a more readable site in general.
A workflow consideration is that you don't want users to manually set syntax highlighting until after tagging. One way to do this would be to put a primary language selection control next to the tagging control. It would show the tag-inferred primary language, if there one. In any case, it would allow specifying/overriding the primary language.
Specifying a primary language would add a language-all directive at the end of a post, similar to how links are placed automatically at the end. The rules for interpreting language-all comments would be tweaked so that placement at the end of the post has equivalent semantics as at the beginning. It seems likely that such a tweak would not cause any significant compatibility issues.
Example of what a post would look like after the user selects a language using the UI control I'm requesting:
I was trying to compare how many gumballs it takes to [clog][1] my processor's pipeline
compared with my web server's pipeline. It seems that Apache mucks up quicker with
sugar-free and AMD chokes on excessive gluten...
class Cluggaclugga { public int IsSlimy; }
[1]: http://stuck.io
<!-- language-all: c# -->
<!-- language: lang-foo -->got cleared by intervening text.<!-- language: xxx -->tags easier by popping up a dialog with common choices and a text area where you can type in your own if needed.