Skip to content
This repository has been archived by the owner on Jan 28, 2019. It is now read-only.

Monkey patch let? #8

Open
arrdem opened this issue Dec 8, 2016 · 0 comments
Open

Monkey patch let? #8

arrdem opened this issue Dec 8, 2016 · 0 comments

Comments

@arrdem
Copy link
Owner

arrdem commented Dec 8, 2016

clojure.core/let (okay really clojure.core/destructure) makes some assumptions about how do to map destructuring on things which happen to be sequences. Tagged values happen to be both maps (Associative) and sequences. destructure assumes that if you're trying to use map destructuring and the value is a sequence, then you need to construct a map from the sequence. This conditional would be better expressed as "if using map destructuring on something that isn't a map, make a map" rather than "if you have a sequence, make a map" because being sequencey is orthogonal to being mappy whereas not being mappy is a clear case.

Not sure if monkeypatching destructure will actually work because it's a macro, which means all existing expansions of it are "stale" and won't reflect the patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant