News for hackers. Stuff that matters.
Re:Lodash just declared issue bankruptcy and closed every is... by virtue3 on Saturday September 16, 2023 @11:50PM (#37541358)
What got me to stop using reduce was when I and another sr. held a theoretical "gun" to a jr devs head and asked him what a block of code involving reduce did and they didn't have a clue. They were pretty bright; so I just threw it the towel at it being useful to the health of a large codebase after that.

Still love map. But reduce can feel very "code golf" real quick.

Re:Lodash just declared issue bankruptcy and closed every is... by yakshaving_jgt on Sunday September 17, 2023 @02:50AM (#37542206)
I’m confused. Do you not think that would have been a good opportunity to teach that person what folds are for?

Fold/reduce is fundamental. It’s weird to me that its use would be discouraged or outlawed somewhere.

Re:Lodash just declared issue bankruptcy and closed every is... by jrockway on Sunday September 17, 2023 @03:15AM (#37542358)
If your language has a `for` keyword, I would just say use the `for` keyword.
Re:Lodash just declared issue bankruptcy and closed every is... by yakshaving_jgt on Sunday September 17, 2023 @03:23AM (#37542403)
But why?

The language I use has various flavours of `for`. It also has various flavours of map and fold. It also has recursion.

They each do different things. Those differences are meaningful and useful. Why would you limit yourself to just using `for`?

Re:Lodash just declared issue bankruptcy and closed every is... by izietto on Sunday September 17, 2023 @03:46AM (#37542531)
It depends. It isn't the case for Ruby, for example.
Re:Lodash just declared issue bankruptcy and closed every is... by thesnide on Sunday September 17, 2023 @03:26AM (#37542416)
So. That. https://blog.pwkf.org/2022/09/18/always-optimize-for-dummies...

"Easy to read" means "easy for others". Current efficiency is usually borrowed on future one.

Re:Lodash just declared issue bankruptcy and closed every is... by tacitusarc on Monday September 18, 2023 @12:42AM (#37552313)
Which junior devs?