honeysql

Discussion of https://github.com/seancorfield/honeysql :slightly_smiling_face:
joost-diepenmaat 2017-07-20T07:22:53.428859Z

I don’t think I’ve ever used tuples. For me having vectors ALSO work for aliasing is much more obviously confusing

joost-diepenmaat 2017-07-20T07:23:32.440410Z

Converting both cases to “fake” calls would solve it, though it would be an obviously breaking change:

joost-diepenmaat 2017-07-20T07:24:25.456374Z

[:tuple :a :b :c] or something similar and [:as :foo :bar] instead of [:a :b :c] and [:foo :bar]

seancorfield 2017-07-20T15:43:18.563442Z

Breaking aliasing would break a lot of code I suspect -- I couldn't support that change. Breaking tuples is a much smaller breakage I suspect (but I'd like to see feedback to indicate whether I'm wrong).

seancorfield 2017-07-20T15:46:59.708813Z

Given how :as is used in Clojure, I think the natural syntax would be [:table :as :alias] even tho' that would be at odds with the prefix-as-operator nature of HoneySQL everywhere else. I think HoneySQL could introduce such aliasing syntax and deprecate the old aliasing syntax but you'd need a steady progression of releases that a) introduced the new syntax then b) produced a warning for the old syntax then c) threw an exception for the old syntax then d) removed the old syntax, in order to give people a safe migration path -- and a way for the library to warn users their code will break, then a specific breakage. Having a change cause potentially silent breakage is an extremely unpleasant UX.