@seancorfield you can set a print-method per reify instance, it's a bit hairy but it works
There could be an argument to allow to do that in the reify declaration as an improvement
@mpenet More details?
you can just set a print-method for the type generated by reify
you might want to do it only once, not every time you use that reify tho
My feeling right now is that this is purely to aid error handling and to give a hint in the REPL for misuse of an API so I don't think I need to ensure "printability" here. I just want to "guide" folks...
well you could hide the #object stuff and show whatever you want
Here's the specific issue https://github.com/seancorfield/next-jdbc/issues/31
I don't want to enshrine behavior around the misuse -- just make it clearer what the person got wrong.
If you do something that produces a Java object, you should get #object[...]
in the REPL. That's the correct behavior.
oh ok, I misunderstood your issue
NP. Seems to be the pattern of the day, getting misunderstood 🙂
I'll be honest, my first reaction was "You misused the API, you get whatever the REPL says!" but that's perhaps less than helpful...
I was actually surprised I could just slap toString
into any reify
and get that behavior... it was kind of a bonus!
Where would I look to find the design document which formerly lived at https://dev.clojure.org/display/design/Exception+handling+update (linked from CLJ-2373)?
Probably here: https://archive.clojure.org/design-wiki/display/design/Exception%2Bhandling%2Bupdate.html
Found via Google search terms: "exception handling update site:http://clojure.org". I knew Alex Miller had published a bunch of that stuff under a different URL, but forgot what it was.
Feel free to add another comment to that ticket with the updated link.
I spent some time working on getting those to redirect but due to things like the + encoding, it's ... tedious
ok, in lieu of making that actually work, I've made all the old design pages redirect to the home page of the archive. at least you'll be in the ballpark
Thank you!