Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



I 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.


This 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-concatenat...

C preprocessor can be confusing at times.


I think it's more that it can be confusing for the reader.


Pretty good, but I've never had a problem with an XMLHttpRequest being inconsistent. Everything else seems spot-on though.


XML 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.


Clearly 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.


I think they're joking about the capitalization of the name.


Yeah. That's what I was going for ;)


I get it now! Duh.


You'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/XMLHtt...


Disagree. 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: