clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
mpenet 2019-06-12T06:01:22.098900Z

@seancorfield you can set a print-method per reify instance, it's a bit hairy but it works

mpenet 2019-06-12T06:05:05.100300Z

There could be an argument to allow to do that in the reify declaration as an improvement

seancorfield 2019-06-12T06:12:44.100600Z

@mpenet More details?

mpenet 2019-06-12T06:13:31.101700Z

you can just set a print-method for the type generated by reify

mpenet 2019-06-12T06:13:51.102500Z

you might want to do it only once, not every time you use that reify tho

seancorfield 2019-06-12T06:13:53.102600Z

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...

mpenet 2019-06-12T06:14:17.103Z

well you could hide the #object stuff and show whatever you want

seancorfield 2019-06-12T06:14:38.103400Z

Here's the specific issue https://github.com/seancorfield/next-jdbc/issues/31

seancorfield 2019-06-12T06:15:11.104200Z

I don't want to enshrine behavior around the misuse -- just make it clearer what the person got wrong.

seancorfield 2019-06-12T06:15:54.105100Z

If you do something that produces a Java object, you should get #object[...] in the REPL. That's the correct behavior.

mpenet 2019-06-12T06:22:26.105500Z

oh ok, I misunderstood your issue

seancorfield 2019-06-12T06:24:53.106Z

NP. Seems to be the pattern of the day, getting misunderstood 🙂

seancorfield 2019-06-12T06:25:39.106800Z

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...

seancorfield 2019-06-12T06:26:38.107500Z

I was actually surprised I could just slap toString into any reify and get that behavior... it was kind of a bonus!

enn 2019-06-12T19:54:36.108100Z

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)?

2019-06-12T19:56:08.109100Z

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.

2019-06-12T19:56:31.109400Z

Feel free to add another comment to that ticket with the updated link.

alexmiller 2019-06-12T20:04:21.109900Z

I spent some time working on getting those to redirect but due to things like the + encoding, it's ... tedious

alexmiller 2019-06-12T20:10:02.110600Z

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

enn 2019-06-12T20:48:24.110800Z

Thank you!