Imperative vs Declarative programming in JavaScript

preview_player
Показать описание
The most common explanation of the difference between imperative and declarative programming is that imperative code tells the computer how to do things and declarative program focuses on what you want from the computer. You may feel like this explanation is quite confusing but I will make sure to make it much more clear.

00:00 - Intro Imperative vs Declarative
01:24 - Statements versus Expressions
04:30 - State management
06:50 - Functional Programming in JavaScript
09:25 - Procedural vs Functional Programming
10:56 - Object-Oriented vs Functional Programming
12:16 - Imperative versus declarative cycles and arrays
15:31 - Conclusion
Рекомендации по теме
Комментарии
Автор

I have never in my life seen better camera quality from an at home youtuber wow. Also thank you this was helpful.

katbutler
Автор

I don't know if I sounds stupid, but I love the hybrid way, because it will be hard to convert most developers to use a declarative way, but in other hand, writing imperative code would be bad, so for me I'm taking a middle way where I have a lot of reusable functions that manipulates it's input instead of doing side-effects and so on, and I think this the best way.

abdulhameedmaree
Автор

This was VERY VERY helpful, thank you sir.

Автор

none of what you're calling declarative actually is. this is all imperative

saying "but i'm telling it what i want from it" doesn't change that it's still imperative

declarative programming is when you give a goal and the computer is asked to try to find a solution for it. you're not doing that here

css is declarative. so is most sql

JohnHaugeland
visit shbcf.ru