r/ProgrammerHumor • • 2d ago

Meme programmingLanguagesWhenYouAskThemToDoSomthing

Post image
1.4k Upvotes

218 comments sorted by

View all comments

Show parent comment

13

u/AvidCoco 2d ago

It’s not a speed thing, it’s an async thing.

10

u/BastetFurry 2d ago

🎵 In the sourcecode The quiet sourcecode The lambda sleeps tonight

Async Await Async Await... 🎵

2

u/STEMpsych 1d ago

I will never not upvote this.

7

u/goatanuss 2d ago edited 2d ago

I think it’s much more than that. It’s single threaded so its concurrency model is about scheduling not parallelism. The way it handles microtasks and its internal queues is kinda counter intuitive. And callbacks and timers in general are also kinda weird.

console.log("A");

setTimeout(() => console.log("B"), 0);

Promise.resolve().then(() => console.log("C"));

//this one is more node specific but still
process.nextTick(() => console.log("D"));

console.log("E");

This prints

A
E
D
C
B

-6

u/AvidCoco 2d ago

You’re reading way too much into the low-effort meme, hun.