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

>"And this is why Javascript can be such an awful language."

To be fair, this is breaking Javascript and that is something you could do in other languages, for instance here is a similar version for C++:

http://pastebin.com/seySfpku



> #define int INT

This makes it somewhat obvious that you can't change how basic types work in C++. On the other hand, JS's dynamicity makes for some interesting situations, as seen here. I wouldn't consider it "awful" but it's certainly a language with more "deep complexity" than appears at first glance.


Now do it in Haskell.


Pedantry aside... are you really going to defend Javascript's core method of function handling as good design by using the C function pointer as an example?

On some level, defending JS using C is like saying you can also make a souffle by instead cooking the chicken with the egg still inside it. Both JS and its bad paradigms came from C. You don't arrive at good design by showing that other people also got it wrong.


I think you are missing my higher point. I am not defending JS or C++ for that matter (please note that I was not using C), but the fact that giving enough time you can break most languages to do something silly, in which case I don't blame the tool but the people using it.




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

Search: