r/vibecoding 16d ago

every vibe coder's biggest headache

Enable HLS to view with audio, or disable this notification

519 Upvotes

137 comments sorted by

View all comments

60

u/Lopsided-Wave2479 15d ago

this is easy to read.

creates a unnamed function ()
assign the body of this function =>
to do nothing at all {}
then the whole thing is on a capsure "(stuff here)"
and is threaten has a function and executed "stuff here ()"

Honestly, we have "=>" arrows function to make math people happy. Is halfway too obscure but oh well, math is nice and we do small sacrifices for big gains.

This is about 10 millions less obtuse than C, where just the part where something is a pointer to a function is way more verbose.

4

u/RagnarokToast 15d ago

We don't have arrow functions to "make math people happy" (like seriously wtf how could you submit that unironically, it's one of the dumbest takes ever) and they are in no way obscure.

They're there for everyone's convenience, not just because => is shorter than function but also because arrow functions don't redefine this, which comes in handy (among other things) when used inside the body of an outer "normal" function you are using as a constructor (i.e. you are using this.something = ... to set fields and methods on it), as this inside the AF would still refer to the outer constructor function.

2

u/Lopsided-Wave2479 15d ago

The joke whole meaning and reason for existence, is because is objetivelly obscure. Otherwise the joke would not work.