News for hackers. Stuff that matters.
Re:“Coding is basically just ifs and for loops.” by filoeleven on Saturday December 04, 2021 @08:16PM (#29445916)
I view map/filter as better abstractions than for loops, and do not consider them to be sophisticated language constructs. They correlate with descriptions of a program’s goals much more naturally than for loops do: get the name of each user, remove everyone under 21, only show accounts with positive balances, etc. Reduce is more arguable, but I think it also applies: show the total amount of money in all of this user’s accounts.

“If” however seems pretty fundamental.

There are no comments on this comment yet.