Fork me on GitHub
#clojure
<
2016-04-10
>
seancorfield17:04:39

I just posted to #C03RZGPG1 about the 0.5.6 release of clojure.java.jdbc which cleans up the API and deprecates all variadic function signatures to make the library more composable with other code. https://github.com/clojure/java.jdbc#change-log Happy to discuss in depth here or via DM.

donaldball17:04:27

"deprecates all variadic function signatures” 😍

seancorfield17:04:48

At World Singles, we rely heavily on clojure.java.jdbc and the variadic calls are a pain to deal with when composing the library into other code 😞 We had one insert! call that used apply and concat to string together not only a bunch of rows we’d extracted from another table but a string of keyword/value option arguments as well. shudder

seancorfield17:04:33

The upcoming 0.6.0 release will remove all deprecated features from the library (including the older API in java.jdbc.deprecated).

seancorfield18:04:07

"deprecates all variadic function signatures" — this isn’t quite strictly true as a few of the "command" style functions are still variadic (e.g., db-do-commands) but those are less likely to be composed (I think) and they don’t have any trailing keyword options etc.

seancorfield18:04:05

Also db-do-prepared is still variadic but also has no trailing keyword options so using apply with that tends to just involve a sequence of parameter groups to be passed into the SQL.

seancorfield18:04:06

I may have a go at rewriting those so I can deprecate the variadic aspect...

mrg18:04:06

@viebel: KLIPSE works now in my RSS reader. One funny thing is that the page always scroll to the vertical middle when opening an article

Yehonathan Sharvit18:04:41

1. Could you please open an issue?

mrg18:04:36

Will do. Haven't read it yet, but did add it to my pocket queue. Why?

Yehonathan Sharvit18:04:13

I was curious to receive your feedback

Yehonathan Sharvit18:04:20

We had a lot of page views today

Yehonathan Sharvit18:04:34

It seems people are really interested by defprotocol secret

mrg19:04:36

It's a good, clickbaity title simple_smile

mrg19:04:43

I'm definitely curious

mrg19:04:13

I'm opening the issues on github viebel/klipse

Nicolas Boskovic19:04:26

Is something like this doable?

Nicolas Boskovic19:04:54

It considers it to have the same arity

mjhamrick19:04:26

@nnbosko: Is there a reason you wouldn't want to use a mulitmethod there? You can dispatch off of type.

Nicolas Boskovic19:04:50

I just wanted to see if I could make a generic catch-all function for those cases but it's not really necessary

sveri19:04:22

I like these too, from time to time

adamkowalski19:04:37

@nnbosko: you could probably use core match