Dave Cunningham
Dave Cunningham
Yeah it's preferable to use an existing syntax if one exists. That looks like it shouldn't clash with anything, although it's a bit weird to see { } used for...
I think `local { foo, bar } = expr` isn't so bad actually, because it's an object being deconstructed, so the left hand side semantically matches the right hand side....
Thanks for the update. Does `local { x } = {x::1}; x` produce 1? Does `local { ...r } = {x::1}; r` produce {} or {x: 1} (i.e. does it...
Ignoring the :: in the deconstruction sounds good to me. (Referring to `local { x } = {x::1}; x`)
A way to delete a field (without ::) is something people ask for from time to time so I think it's better to just add that. Then you don't need...
Sorry I only just saw this. I need to look closely at your work but I will say now that local in comprehensions has come up before: https://github.com/google/jsonnet/issues/90
Also, the go-jsonnet desugaring of comprehensions is completely different to the C++ one.
Sorry it took me so long to get back to you on this. To your first point (whether we need to do it everywhere a binding occurs), I also prefer...
I didn't really jrsonnet was extending the language, have they got a list of features they've added?
Out of interest, why does it use `{ a: b }` syntax for function parameter binding but `{ a = b }` syntax for local variable binding?