samuelgoto / proposal-block-params

A syntactical simplification in JS to enable DSLs
204 stars 8 forks source link

Harder to learn FP basics with blocks #32

Open baron816 opened 6 years ago

baron816 commented 6 years ago

I started to learn how to code with Ruby, which heavily uses this type of syntax, and I really didn't understand how blocks worked until I started passing functions as arguments to other functions in JavaScript. It's just so much clearer and easier to reason about when it's explicit and you don't have this other weird thing that's not referred to as a function being passed to a function.

Blocks are just too much magic that obscure the simple thing that's really going on. With this, we're just eliminating a few more characters--stuff that's really easy to auto complete with a text editor--at the cost of readability.

I'm not a fan of the arrow function to begin with. The JavaScript function is what JavaScript does best, and it's probably the one thing that makes it fun and interesting to use. I really don't like changing it to mimic languages without first class functions.