The Two Pillars of JavaScript
medium.com
The Two Pillars of JavaScript
1–10 of 16 posts
Re: The Two Pillars of JavaScript
#2I'm glad I'm not the only one.
One of the reasons Javascript became so popular is that it took many of the properties that Lispers have been extolling for decades (minimal syntax, light-weight, meta-programmable, functional, composable), but wrapped them in a familiar-enough looking package that even beginners can Get Stuff Done. (Which is where Lisps have historically failed.)
I'm hoping the future of Js will continue in this direction, but looking at ES6 and Angular, it looks like too many people are trying to turn Javascript into Java.
The heart of Javascript is simplicity and power. Arrow functions and modules are a great addition. Maybe with enough support from the community, instead of more syntactic sugar and complexity, ES7 will adopt macros (http://sweetjs.org/) and a type system (e.g tcomb ( https://github.com/gcanti/tcomb )).
Re: The Two Pillars of JavaScript
#3> “The `class` keyword will probably be the most harmful feature in JavaScript." I'm glad I'm not the only one. One of the reasons Javascript became so popular is that it took many of the properties that Lispers have been extolling for decades (minimal syntax, light-weight, meta-programmable, functional, composable), but wrapped them in a familiar-enough looking package that even beginners can Get Stuff Done. (Which…
Re: The Two Pillars of JavaScript
#4Re: The Two Pillars of JavaScript
#5> “The `class` keyword will probably be the most harmful feature in JavaScript." I'm glad I'm not the only one. One of the reasons Javascript became so popular is that it took many of the properties that Lispers have been extolling for decades (minimal syntax, light-weight, meta-programmable, functional, composable), but wrapped them in a familiar-enough looking package that even beginners can Get Stuff Done. (Which…
You're not the only one, but we're being steamrolled by the Java crowd and I'm afraid that we're in a losing position. Angular is the first of many to come.
Re: The Two Pillars of JavaScript
#6Re: The Two Pillars of JavaScript
#7The benefits of prototype inheritance have always seemed rather dubious to me. The programmer wants to express that there are a bunch of objects with the same structure and behavior; the compiler needs to know which objects have the same structure and behavior. Forcing both sides to pretend that each object is a unique and special snowflake when that is both counterfactual and inconvenient for all involved seems pret…
Actually, there is just prototypal inheritance. The whole `new` operator thing (as well as ECMAScript 6 classes) is just syntactic sugar over prototypal inheritance.
But yeah, it's crazy that this had to be put in just to attract users (in the 90s, to make it look more like Java; along with method names etc).
Re: The Two Pillars of JavaScript
#8I've been working with JavaScript for the past few months in a class-heirarchy environment (Educational games using a proprietary engine), and it seems to be working pretty okay.
I guess it might be because the hierarchy isn't very complex as far as I'm concerned. A lot of the ugliness in the engine is abstracted away from me as a game developer.
Re: The Two Pillars of JavaScript
#9Re: The Two Pillars of JavaScript
#10Interesting. I've been working with JavaScript for the past few months in a class-heirarchy environment (Educational games using a proprietary engine), and it seems to be working pretty okay. I guess it might be because the hierarchy isn't very complex as far as I'm concerned. A lot of the ugliness in the engine is abstracted away from me as a game developer.
These things have a tendency to balloon out of control over time. I've seen class hierarchies start out very benign. Convenient and well-designed, even.
But as the codebase grows and new objects need to be modeled, it inevitably gets stretched beyond the limits of its original design, and that's where things start to crumble.
Also, the more layers of inheritance there are, the more brittle the code becomes due to tight coupling between child and parent classes. Super calls start to turn into a tangled nightmare.
Here's a different perspective on the same topic: http://berniesumption.com/software/inheritance-is-evil-and-m...