DEV Community

Manuele J Sarfatti
Manuele J Sarfatti

Posted on

 

Your boat is sinking, you think you can make it to land, but you can only...

...save one flavour of JavaScript: OO or functional.

Which one do you bring with you and why?

Oldest comments (8)

Collapse
 
anwar_nairi profile image
Anwar • Edited

POP, because it offers runtime mutation of the code, I like it a lot

Collapse
 
mjsarfatti profile image
Manuele J Sarfatti

You mean OOP right?

Collapse
 
anwar_nairi profile image
Anwar

Nope, I mean prototype πŸ€“

Thread Thread
 
mjsarfatti profile image
Manuele J Sarfatti

Interesting 🧐

Collapse
 
nicolus profile image
Nicolas Bailly

Typescript, which is the only sane way to do Object Oriented javascript.

Collapse
 
tobiassn profile image
Tobias SN

I give a Swimmer class to OOP and save functional.

Collapse
 
mjsarfatti profile image
Manuele J Sarfatti

πŸ˜‚

Collapse
 
nicholascloud profile image
Nicholas Cloud

Prototypal.

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.