3 ms·
> This is a semantic quibble, but I disagree that objects in JavaScript are any less proper OO just because they are implemented as associative arrays. JavaScri
by calebmpeterson 15y ago
> This is a semantic quibble, but I disagree that objects in JavaScript are any less proper OO just because they are implemented as associative arrays. JavaScript is a fundamentally OO language in a way Scheme is not - for example all built-in types in JavaScript are objects with methods.
Not even a semantic quibble - more like me poorly expressing my typical use of objects in JavaScript. I agree - objects in JS are full objects. I just tend to limit my use of them to the associative array realm...
> I think OO is getting a bad name due to people annoyed with Java, and functional is hip these days.
Agreed. I've written ~250K lines of Java (real-time, highly parallel and concurrent systems with hardware accelerated UI) in the past 3 years and love many things about the language and (especially) the JVM. FP is certainly in vogue right now - and for mostly good reasons. Hopefully as the pendulum swings we'll end up with a healthy middle-of-the-road approach which incorporates OO and FP. After all, closures are a poor man's object and objects are a poor man's closure.
> But JavaScript is still an OO language.
Most certainly! I was just highlighting the ability to (mis)use it as a functional language. Though as a functional language its lack of immutability is a double edged sword...