samuelgoto / proposal-block-params

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

Request: make the introduction more clear #3

Closed mathiasbynens closed 6 years ago

mathiasbynens commented 6 years ago

As someone unfamiliar with this functionality, this sentence tripped me up:

For example, a {} is isomorphic to a(function() {}) or a(1) {b()} is equivalent to a(1, function() {b()}).

The first example is easy to follow, but the second one really takes it to another level. Can this be elaborated upon a bit more in the introduction? Moving to code blocks vs. giving these code examples inline in a sentence would already help a great deal:

a {}
// → is equivalent to →
a(function() {})

a(1) { b() }
// → is equivalent to →
a(1, function() { b() })
samuelgoto commented 6 years ago

done, moved to code blocks and tried to explain a bit further.