Hey! I'm YCMJason, a Software Engineer in London 👨💻. Love diving into tech puzzles and sharing them! 🧩
All views expressed here are my own opinions, so please take them with a pinch of salt! 🧂
Readability vs performance is a hard thing to argue. Everyone has their own interpretation as of, what is readability, what is performance and why one is more important than the other etc.
I hope you have read the article I linked in the beginning. .reduce is a very vey powerful function. Simply by using it incurs readability cost. Because the reader need to figure out what it does. As oppose to using Object.fromEntries which the user knows immediately that it is constructing an object. There is nothing to "read into" to understand what it does.
I won't try to convince you because I don't think I can. But please go and try writing code this way. Maybe you will gain some new insights.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Readability vs performance is a hard thing to argue. Everyone has their own interpretation as of, what is readability, what is performance and why one is more important than the other etc.
I hope you have read the article I linked in the beginning.
.reduce
is a very vey powerful function. Simply by using it incurs readability cost. Because the reader need to figure out what it does. As oppose to usingObject.fromEntries
which the user knows immediately that it is constructing an object. There is nothing to "read into" to understand what it does.I won't try to convince you because I don't think I can. But please go and try writing code this way. Maybe you will gain some new insights.