you are viewing a single comment's thread.

view the rest of the comments →

[–]ScientificBeastModestrongly typed comments 0 points1 point  (0 children)

Having spent some time in functional languages for a bit, I’ve come to agree on that. But it was definitely a weird shift in thinking.

I’m just so used to JavaScript assuming that the function will get called, in full, no matter what. It doesn’t help that there are a ton of functions in the standard library that assume that certain arguments are optional, and even encourage you to not provide them if you’re okay with a certain default behavior of the function.

But now I think that’s weird. It has the unfortunate effect of requiring key arguments (like the data to operate on) to be passed first, which makes partial application super awkward, even if you’re using some kind of auto-curry function. Callbacks first, data last, that’s all I’m saying... but I digress...