Ramon Guijarro - You might not need JavaScript classes

preview_player
Показать описание
More than three years later, the introduction of classes to the ECMAScript standard is still a controversial topic. Brought over from popular classical object-oriented languages, they’ve not only been argued an unnecessary feature for JavaScript, but their usage can become actually harmful very easily. In this talk we’ll take a look at the potential issues and pitfalls of using classes, like the need for context binding of methods, and suggest alternative patterns that are conceptually simpler, easier to work with, safer to use, more idiomatic, require less code and are actually more powerful. Come realize that all you really need in JavaScript are functions!
Рекомендации по теме
Комментарии
Автор

Secretly I was hoping this talk would be about transcoding Kotlin to JavaScript, but great talk as it is too. :)

SirWolf
Автор

At 29:41, I presume you made a typo, and "increment" should be just "inc".

SirWolf
Автор

Thanks for explaining this. JS isn't hard to learn, but knowing when and why to use different implementations is the difficult part for me. There are just too many ways to do the same thing. Yes, I thought about another analogy but I like cats .

jeff-creations