I'm somewhat of a n00b when it comes to object-oriented development and C#, but that is what I've been doing for the past couple of years now. My background is in more procedural type programming languages, like PL/SQL (I did a lot of Oracle development early in my software development career). I've been doing some more web development lately, and one of the things I'm being painfully reminded of is how much I really dislike JavaScript. Why? Because JavaScript is not a strongly statically typed language (its dynamically typed (see "Static vs dynamic typing" here)). The fact that I can declare a variable (or not...you don't really even *have* to declare your variables in JS), but NOT give it a type, can be extremely painful if you're not careful. With a nice, strongly statically typed language like C#, when I declare a variable/object, I have to declare what type of an object it will be...and it will ALWAYS be that kind of object. Always. Until it is destroyed, that is the kind of object it will be. What's so great about that? The fact that I always know what I can and can't do with that object. That's the very thing that makes working with JavaScript so painful. When I declare a variable, I might initialize it as a number. But then, I might set its value later by calling another function. Who knows what kind of data is returned by that function. (Granted, maybe I should by understanding what that function is doing, but if I didn't write the function, it's not always intuitive) I might now be working with a string, or a date. So now, when writing my code, I might try to access a property of that variable, or perform some method/function on it, whatever. In code, it seems just fine. But it's not until I actually run my application (this indicates that its a dynamically typed language) and it pukes all over my JavaScript code giving me an "object does not support this property or method" error that I realize that something is now wrong. But what? What do I need to do to fix it? What can I do or what can I NOT do with this variable now? Its hard to tell.
Yes, I'm sure I've become spoiled by the beauty of the Visual Studio development environment and the wonder that is Intellisense. Yes, I probably also have a LOT to learn about writing good JavaScript code. But despite all of that, I still find JavaScript to be one of the most painful programming/scripting languages I've ever had to work with. Can I get an amen? Anyone have any suggestions for growth in this area?
UPDATE:
I need to correct myself here. It was brought to my attention that I used incorrect terminology here. I should have used the term statically typed, when referring to C#, as opposed to strongly typed; and I should have used the term dynamically typed as opposed to weakly typed in reference to JavaScript. I've made corrections above, including the title. Thanks for the correction Foo (sorry, I'd use a more appropriate reference, but that's all you left me).