In my opinion it is irresponsible to post strongly worded opinions such as these, because you forget you may not be seeing the whole picture.
Cons when the server do the lexing ONCE:
- NOTHING
You are assuming a specific use case, where static code originally exists on the server and the highlighted version is included in a page that is viewed many times.My use case for these libraries is different: users actually write 'code' in my app, which I wish to highlight as they type it. Of course many users will write the same fragments and energy could be saved by caching the highlighting of those on the server. However, the latency of that solution (roundtrip to server needed to highlight code) and the code complexity (cache expiration is one of the two 'hard' problems in SE) are much worse than for the client-side highlighting solution.