Closed theScottyJam closed 2 years ago
To put it another way, this makes about as much sense to me as allowing syntax like this:
if (x + y) === (3) {
...
}
I don't think that was intentional - I believe your syntax 2
is our intention. For more clarity, see here (and the rest of that thread)
Hello, this is a bug in the readme. Already fixed in #251, but not merged yet.
Ok, sounds good. Thanks for clarifying. 👍️
The README presents the following example, that showcases how to use the
with
"operator":Other examples use
with
more like this instead:Without the clutter, this is the difference:
Is this intentional? The "syntax 2" option makes sense to me, because you're supposed to be able to use
with
on any pattern including nested ones. The "syntax 1" option does not make sense to me, it sort of puts this "with" operator into the same syntax-space as a guard-clause, and I don't really like that. If this is intentional, are there also plans on making it so you can use "and" and "or" in a top-level way (the syntax 1 option) as well?