Hacker News new | ask | show | jobs
by russellbeattie 1375 days ago
I was just about to make this same exact comment! I was half way down the page and thought, "Wait... What language is this again?" I had to scroll back up to confirm.
1 comments

Clean and readable, more like C than meta filled C++ with templates.
Nah, it’s just having professional coding and review standards that are very heavily enforced. This particular code is also aided by being fairly simple in function of course. In my experience C code is generally worse than C++, as a lot of what large C projects do is stuff that C++ does automatically, and with more safety.

That said for the most squirrely code in webkit you need to look to JSC where the perf critical and machine abusing code is stuck (though obviously minimized as much as possible). My most terrible contribution there is the parser which uses macros and templates together (parsing JS is extremely perf critical in real world page loading because the parser often has to deal with megs of code, all of which has to be parsed before you can consider executing it and in many places page loading is blocked on said execution)