logoalt Hacker News

chuckadamsyesterday at 8:48 PM0 repliesview on HN

One thing I've been very glad for in all the years I've been using TS+Vue is that I'm not forced into JavaScript's craptastical OOP system that was a bolted-on kludge well before ES2015 class syntax was even a thing. Having to use patterns like "foo.bar.bind(foo)" is what I consider fighting the language. Having to know that `this` is something different in an event handler, and thus having to bind it to some other variable, unless of course I use an arrow function, where there is no `this` at all, is fighting the language.

When I use static closures, functions are just functions, closures are closures, things just work. I don't have anything against OOP whatsoever, and I'm even fine with prototype-based OO, but the the way it's done in JS is littered with everything from papercuts to outright landmines. So a framework like WebComponents or this one, that forces me to use JS's OO mechanics, is a non-starter. Of course so are React hooks, which are barkingly insane for completely different reasons.