Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported binding form #14

Open
neapel opened this issue Jul 28, 2014 · 1 comment
Open

Unsupported binding form #14

neapel opened this issue Jul 28, 2014 · 1 comment

Comments

@neapel
Copy link

neapel commented Jul 28, 2014

(let [ variable #spy/d (complex expression) ] ...

prints (complex expression) => ... which can become quite unreadable, alternatively one would have to use #spy/p or set a name manually.

It would be great if the straightforward expression

(let [ #spy/d variable (complex expression) ] ...

Would print variable => ... instead of causing a load failure.

I'm not sure if this is possible using data readers — the #spy/d would have to recognize it is used on the left side of a bind expression, move to the right side and use the variable as its :form argument?

@dgrnbrg
Copy link
Owner

dgrnbrg commented Aug 2, 2014

That would be really awesome, and it's exactly possible, but I have some ideas for how to make it work. Here's some things we'd need to work out before implementing: how does this interact with destructuring? Does it only work on the top level binding, or does it work for inner destructuring forms?

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

No branches or pull requests

2 participants