Worst language features, all languages?¿?
Hello all,
I've recently, for the past 3 months or so, been relearning JavaScript in order to build a game engine based on the new HTML5 canvas API.
I first learned it as a young teen, and at that time was oblivious to it's downsides. Now that I've delved deeper into the actual language (rather than just making pretty effects), the downsides stick out more blatantly.
For instance the same mechanism that makes closures possible (scope reference chain), also makes it possible to sneakily create global variables from undeclared ones.
Also being able to call methods from different objects with a similar interface allows polymorphism, but when the same functions are called without an object, the 'this' is bound to the global object (called "window" in browsers), unless you state that you want to use strict mode.
This isn't to bash any language, I just have a theory that bad features often come as a side effect of doing old things in new and interesting ways.
So basically, I'm wondering what are the worst language features of any language you know? Also, any reasoning for their inclusion in the language of reference is a plus!
:wink: