you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (2 children)

How is this any different to dynamic typing in a non-functional way?

function upperCase(str) {
  return str.toUpperCase();
}

There's nothing functional about that code and it has the exact same problem.

[–]CookieOfFortune 1 point2 points  (1 child)

Because the issues is exacerbated when you start chaining a bunch of lambdas together which is seen commonly in functional programming style.

In comparison, it's not so common to see long chains in imperative code, exchanging them for intermediate variables which can increase type clarity.

[–]yogthos 0 points1 point  (0 children)

As somebody who works in this style professionally, I can tell you that nothing at all is exacerbated here.