4 ms·
The central problem with Angular is what is says about the software industry in general - that a framework so fundamentally and ridiculously flawed could invite
by engendered 12y ago
The central problem with Angular is what is says about the software industry in general - that a framework so fundamentally and ridiculously flawed could invite such wide appeal suggests that many people have absolutely no idea what they are doing.
I have yet to see an Angular project that doesn't qualify as tiny. For that purpose -- banging out some internal CRUDish app -- if it allows people to create working success, then it's a success. Instead people are busy arguing over the semantics of over-engineering a couple of text boxes, and that really is what leaves me boggling. Though of course, as is the nature of these things, there are over-dramatizing camps, and one month Angular is the greatest thing ever on HN, the next it's the demonstration of all that is wrong in the world. The reality, as always, is somewhere in between.
It wasn't that many years ago when people didn't even understand basic concepts like closures in JavaScript, or the power they bring. Now people are viciously arguing about the edges. It's all very surreal.
There is simply no way that you can say that you know Javascript and at the same time support Angular.
One of the most common features pushed by just about every framework (just saw it about React yesterday) is desperately, and leakily, trying to abstract Javascript into some sort of classic OOP language. Some of the most popular tools allow you to write in various compiled-to-JavaScript languages (TypeScript, CoffeeScript, GWT, etc). It's all very strange. But again, if JavaScript is treated just as a runtime, and if it works for a team, there is some measure of success.
- Swizec 12y ago> trying to abstract Javascript into some sort of classic OOP language Which is wrong. And, I think, stems from the way CS is taught. Everyone starts with Java and learns that programming is all about knowing that a dog and a cat are just subclasses of the 4-legged-creature class, which is itself inherited from the mammal class. Wait no, that's not right now is it? But it's how people learn. JavaScript is a beautiful glorious language when you realise it's a weird hybrid between functional and OOP and is messy enough to let you do just about anything. It reminds me a lot of what I hear about Scala ...
- pjmlp 12y agoThat is how bad CS is taught. I had the pleasure to learn about Pascal, C, C++, Smalltalk, Caml Light, Prolog, Algol, PL/SQL and Java, as well as, their respective paradigms.
- dmak 12y agoThe worst part about abstracting JS to classical inheritance (ex, CoffeeScript classes) is that the concepts do not match 1 to 1. If you try to create class variables, you will quickly run into closure issues which are clearly obvious in the compiled JavaScript. JavaScript uses prototype inheritance and can fake classical inheritance, but it has its limitations.
- danabramov 12y ago>One of the most common features pushed by just about every framework (just saw it about React yesterday) is desperately, and leakily, trying to abstract Javascript into some sort of classic OOP language. You missed the point of yesterday's React announcement. It's not at all about OOP. See this: https://news.ycombinator.com/item?id=8959691 https://news.ycombinator.com/item?id=8959691 https://twitter.com/swannodette/status/560554408782864384 https://twitter.com/swannodette/status/560554408782864384
- engendered 12y agoYou seem to have misunderstood what I was saying. I said that I saw it yesterday about React. You know, in their announcement where they outright said - "JavaScript originally didn't have a built-in class system. Every popular framework built their own, and so did we." I was not making a comment on any new development or change in direction, just that React (a tool I don't use) admitted to also jumping on the pretend-OOP thing.
- danabramov 12y agoThank you for clarification, I get your point now. To be fair though, React never allowed inheritance (even in its own class system) so it's a bit misleading to compare it to other frameworks where (pseudo-)inheritance is one of the valid ways to reuse UI code. Of all OOP, in my experience it's inheritance that doesn't play well with UI code at all—and React never allowed it in the first place.