I just finished downloading a bunch of Dashboard widgets for my laptop. I still think developing one would be cool, but that unfortunately most likely involves JavaScript. Since having to use the language at work, I have come to learn the frustration of the language's loose semantics.
For instance, there are no checks of argument counts. You can specify that a function have one argument, but call it with none, one, two, three, etc., and no exception will be raised.
Another problem is how objects are created on the fly. If you access an attribute on a non-existent object, it comes into existence. This plays havoc on object instantiation since that is done through a normal function call; using the keyword ``new`` is what makes a function call an object instantiation. The problem boils down to the fact that if a function is used to initialize an object it can succeed even if ``this`` is not set to a new instance but just some object created for the local namespace.
Maybe JavaScript 2.0 will clean most of this up.
2 comments:
...I hate javascript....
I do agree with ya.
Laze, Macedonia.
Post a Comment