Replies: 3 comments
-
Definitely agree that it should be namespaced. Personally I still like it being a keyword and not a symbol. You can do the operator style with m/and. Though it might still be good to add an explicit as operator as well. Thanks for the issue. |
Beta Was this translation helpful? Give feedback.
-
@yuhan0 Great example of the problem. We could support the qualified keyword In addition to the suggestion @jimmyhmiller made, you can also quote {':as ?as :bs ?bs} |
Beta Was this translation helpful? Give feedback.
-
I preferred quoting clashing terms than using namespaces! It occurs to me that you could offer a way to control if/when unqualified op will be used... I am wary of this approach because of possible fragmentation in how people express patterns, but to follow Clojure where you can |
Beta Was this translation helpful? Give feedback.
-
Vector and map patterns currently accept the special
:as
key which binds to the entire structure, however unlike Clojure's destructuring syntax, it is ambiguous when attempting to match with an actual map key named:as
Also the analogy with map destructuring doesn't completely hold, eg.
:keys
does not bind to the map keys.With epsilon's shift towards namespaced operators, would it be appropriate to use a symbol like
m/as
orm/bind
instead? Either in its current position:Or as an operator outside the literal pattern:
Beta Was this translation helpful? Give feedback.
All reactions