Javascript

Disclaimer: this is a rant at 1AM. Content subject to change when I wake up in the morning.

Javascript is not a classical OO language.

Here it is again.

Javascript is not a classical OO language.

You can use classes. You can pervert it into things like Dart, or use gobs of inheritance to build a classical structure. By doing so, you're limiting yourself and destroying the flexibility that Javascript provides. Stop thinking of Javascript like Java, because it isn't. Use object instances and build prototypical objects when it makes code cleaner, not as the general rule. These things aren't evil in any way- but they should be used where appropriate. You don't need contracts. I don't even like typing the word 'contract.' It's ugly. It's ugly in Javascript. It's ugly everywhere, really.

Protip: learn Scheme. Try out MIT's free online courses. Then come back and try out Javascript again.

I went through this phase. I learned Javascript, and used it for horrific DOM manipulations. Then I learned C#. I went through a phase where everything was an object, everything was namespaced. Then I learned Scheme, and bounced around in Python and Ruby a bit. Once you've grasped procedural, functional, and classic OO programming, you begin to see that the patterns in Javacript aren't ugly, aren't random and messy; that you don't need obese structure and contracts and type checking. You can elegantly and concisely pass around functions and objects and whatever, because they're all the same thing anyway, more or less.

Structure is overbearing. Javascript is freedom.

I guess the whole point I'm trying to make here is, I hate sauerkraut.

Posted .