The problem with functional language constructs like map is that they are less intuitive/familiar for beginners. I have found it easier to teach loops than map/filter/reduce. A solution could be that the language suggest this to the developer and offer automatic refactoring of the for-loop, something like: "It might better to use the map function instead -> refactor".
yeah, map has a problematic name for beginners. It should have been called something like apply. Because you "apply" an operation to some thing. "Mapping" a set of things to another set of things (by way of a function) is too much derived from abstract mathematics to be beginner friendly (as is much of FP lingo, sadly).
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.
The problem with functional language constructs like
map
is that they are less intuitive/familiar for beginners. I have found it easier to teach loops thanmap/filter/reduce
. A solution could be that the language suggest this to the developer and offer automatic refactoring of the for-loop, something like: "It might better to use themap
function instead -> refactor".yeah,
map
has a problematic name for beginners. It should have been called something likeapply
. Because you "apply" an operation to some thing. "Mapping" a set of things to another set of things (by way of a function) is too much derived from abstract mathematics to be beginner friendly (as is much of FP lingo, sadly).