How true is this?

How true is this?

Attached: 878782342.png (539x595, 48.76K)

developers like this need to be murdered

Works on my machine

loops are deprecated now

We all do.

Doesn't make any sense at all. Why would using an array somehow obviate the need for loops to process the array, for example?

Sounds like he's bullshitting for clout

>t. professional Java developer / corporate CRUD slave

Attached: 1648952713322.jpg (1000x985, 181.11K)

are maps really faster than for loops?

no

For accessing specific keys they obviously are.
Is this bait?

So many people give advice on improving code locally when problem with most (javascript) code is almost always global.

It's pretty common among midwit JS devs. They're embarrassed by their language so they try to pretend they're using something else in the most superficial way. For example, they think that using the functional array methods makes them cool like functional programmers. They'll literally use Array.forEach(fn) instead of a for..of loop to try and signal to each other that they know what functional programming is, when they have no idea.

In theory they should be, but usually not. Idk about js but at least in java. Maps/filters etc. are more optimizable for the compiler.

I have never touched JS in my life, but those functions are probably implemented using some kind of loop, so there is no gain of efficiency or time when those are used.

He's right tho.

*streams

They're talking about the category theory concept not the data structure user. Good bait though.

I would say that is terrible advice while true. The problem is that most people are imperative programmers. The functions can look cleaners but having mixed code bases can be a pain.

It depends. .map() is faster than the naive for loop version, where you for..of the source array and .push() into the destination array, but it's slower than the optimized version where you preallocate the destination array with new Array(n) and use for(;;) to iterate the source array. The latter is more annoying to write than just using .map().

[...Array(5)].map((_,i)=>{console.log(i)})
Look mom, I'm next level. Don't worry about the memory allocations.

What do the ellipses do?

Fuck you OP. I hate you/ Frogposters, cunnyposters, are not as bad as you twitter posters.
> Hmm, I'm a bored fuck
> There is nothing in my life
> I know, go on twitter!
> Oh, this post looks interesting, let me post it on Any Forums
You can't even just restate his point. "Hey anons map/filter/reduce. I heard it's good for avoiding loops". But clearly that was never the point, the point is to shit this board.
I swear you motivate me to be OP JUST to have anons see threads actually worth going to

Attached: 1646768543612.webm (696x522, 1.72M)