spyscope
spyscope copied to clipboard
Unsupported binding form
(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?
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?