There are problems with code-prettify,
this [^\s>/] == "example" # is highlighted as a regex, not a comment, 1 / 2
..but it mostly does a really good job
There's no good solution to this, Markdown does not provide a way to specify what language a code-block is (see here), so StackOverflow would need to implement their own way.
In the past I've modified a markdown parser to look for a special first-line, something like..
{{language:python}}
import os
print os.listdir()
The usability problem then is, there's no way to know which languages are supported, or how I should specify say, Visual Basic .NET - should it be visualbasicnet, visual-basic.net, vb.net vbnet, etc..?
I suppose this could be overcome by making the code-block button ask for a language (or maybe add second specific-language-code button), but then the site isn't using Markdown anymore, it's using StackOverflows own non-standard version..