(no title)
jdkoeck | 8 months ago
And yes, modern JavaScript uses tons of concept from functional programming, where it is understood that mutating values and triggering side effects should be a last resort. This is why a good js programmer uses ten times more maps then he uses for loops.
Maybe you don’t know how dominant React is today? Two third of JavaScript developers use React at work (https://2024.stateofjs.com/en-US/libraries/front-end-framewo...).
It feels like you’re out of touch, have you used JavaScript lately?
JimDabell|8 months ago
Output is a side-effect.
> This is why a good js programmer uses ten times more maps then he uses for loops.
This is a) massively overstating things, and b) not relevant to a case where zero for loops can be used.
> Maybe you don’t know how dominant React is today? Two third of JavaScript developers use React at work
I checked those figures before I posted that comment to double-check my memory. Two thirds is not anywhere close to “React won the market”. Android has ~72% global market share, but I’m sure you wouldn’t say that Android has won the smartphone market.
> It feels like you’re out of touch, have you used JavaScript lately?
We disagree, that doesn’t mean I’m out of touch. Try not to be so insulting.
jdkoeck|8 months ago
How can you not realize that producing a string or a tree of elements is a purely functional operation? There’s no side effect here. Are you familiar with the concepts of functional programming?