3 ms·
Uglier than a Windows backslash, odder than ===, more common than PHP, more unfortunate than CORS, more disappointing than Java generics, more inconsistent than
by bronson 11y ago
Uglier than a Windows backslash, odder than ===, more common than PHP, more unfortunate than CORS, more disappointing than Java generics, more inconsistent than XMLHttpRequest, more confusing than a C preprocessor, flakier than MongoDB, and more regrettable than UTF-16, the worst mistake in computer science was introduced in 1965.
That could be the greatest intro sentence ever seen on Hacker News.
- protonfish 11y agoPretty good, but I've never had a problem with an XMLHttpRequest being inconsistent. Everything else seems spot-on though.
- iron_ball 11y agoI think they're joking about the capitalization of the name.
- paulddraper 11y agoYeah. That's what I was going for ;)
- protonfish 11y agoI get it now! Duh.
- vbezhenar 11y agoXML is uppercase but Http is not. That seems to be inconsistent, though in some coding standards that's a correct naming scheme: acronyms with length less that 4 are named in uppercase (XML, URL) and acronyms with length >= 4 are named as Http. Another example is HttpURLConnection class from the standard Java library.
- choult 11y agoClearly you've only started using it in the past few years... It was horrific and totally inconsistent across browsers and between versions about 8 years ago and earlier.
- akamaka 11y agoYou've probably started using it more recently, but if you want to see what it used to be like, check out this XMLHttpRequest wrapper and see how many browser bugs it fixes: https://github.com/ilinsky/xmlhttprequest/blob/master/XMLHttpRequest.js https://github.com/ilinsky/xmlhttprequest/blob/master/XMLHtt...
- benihana 11y agoDisagree. I really dislike that sentence stylistically. By the time the author got to the point, there was no way it could live up to that many words (that I mostly scanned, since they don't really add anything to the main point of the article). The article is great, don't get me wrong, and I wouldn't have mentioned anything if you hadn't brought up this point, but I thought I would just provide a counter-point.
- ekr 11y agoI also don't think a C preprocessor is at all confusing, it's quite a simple program, both to write and to program. Including less used features such as concatenation or stringification.
- bjz_ 11y agoI think it's more that it can be confusing for the reader.
- pmelendez 11y agoThis is what you have to do to concatenate a string with another macro: #define VARIABLE 3 #define NAME2(fun,suffix) fun ## _ ## suffix #define NAME1(fun,suffix) NAME2(fun,suffix) #define NAME(fun) NAME1(fun,VARIABLE) int NAME(some_function)(int a); From:http://stackoverflow.com/questions/1489932/how-to-concatenate-twice-with-the-c-preprocessor-and-expand-a-macro-as-in-arg http://stackoverflow.com/questions/1489932/how-to-concatenat... C preprocessor can be confusing at times.