Sam Goto

Results 159 comments of Sam Goto

> Right - I’m confused why we need to modify the parser. Block param syntax is already valid, it just doesn’t do what this proposal wants it to. Hummm are...

> Now i'm confused, does that parse in Chrome? Nope. That does *not* parse in chrome WITHOUT the newline between ```a``` and ```{```. Hence, it requires a parser change, i.e....

Yep, indeed. I left this as an extension here: https://github.com/samuelgoto/proposal-block-params#bindings WDYT?

Yep, agreed that the syntax needs more work. Can you help me identify what are the most common use cases where you'd want arguments? > especially if you have more...

> The most common use cases would be in iteration-like contexts, but not all iteration is synchronous > (like above). One example where multiple distinct arguments would be nice would...

> WIP DOM framework I would love to hear more about your DOM framework :) This was very much started because I feel in love with [Kotlin's examples](https://kotlinlang.org/docs/reference/type-safe-builders.html) of DSLs...

What about the following? ```javascript const Toggle = m.component do ({change, name}) { label({style: {padding: 20px}}]) { ::onclick() { change.send(name) }}) input({type: radio, name: font-size}) { } span(name) {} }...

I dislike ruby's ```foreach (map) { |key, value| }``` syntax, but I think ``` javascript foreach(list) item => { } ``` or ``` javascript foreach(list) do (item) { } ```...

just as another data point, @erights also suggested the following syntax: ```javascript foreach(list) do (item) { } ``` Which I think is a reasonable form and seems to map better...

Thanks for the pointer! Intersting suggestion! More generally, though, there is a broader question of whether we [corner ourselves or not](https://github.com/samuelgoto/proposal-block-params#forward-compatibility) and how we should go about it (i.e. match()...