Open brekk opened 3 years ago
Implementation thoughts on it:
=~
or so ).[]
operator to Map
to make it look like this ? We can do all the rest though, we can spread, we can deconstruct ( well pattern match in a way more powerful way even ). The issue is, say you have a function that does: setForKey :: String -> a -> { whatIsThatKey :: a }
.import IO from "IO"
fn = (_) => ({})
fn(2) |> IO.log
Did you mean something else ?
[ x1
, x2
, x3
]
For 5, it's valid in JS to do [a, b, c,]
.
Oh yes it is for a while now. But what I was saying is that we might want to have one valid syntax that passes the linter and that is formatted by our code formatter. And we did not yet define how we want things to be formatted. I think the argument for trailing commas is mainly to make diffs nicer but also adding a line being consistent with the previous one. That being said I think we should indeed probably aim for something close to what prettier would do in terms of formatting.
We have some rough edges when coming from a JS context still, this issue can ideally enumerate them as we work through them.
{x}
instead of{x: x}
where x is a valid object in context.{[var]: key}
/ref[key]
(x) => ({})