Re: Keyword namespacing best practices
> On Sep 30, 2018, at 23:41, Alan Thompson wrote: > > It is easy to overdo it when trying to predict future needs. I always (now) > do the minimal solution, with the expectation that it *may* evolve in the > future. Normally I'd agree: YAGNI is great for functionality that can be added without breaking clients (or when you control all the clients). But public APIs seem like the place to be forward-thinking, at least for potential breaking changes such as switching to namespaced keywords. > Since the parts that do need change (say 5% ?) are usually not the ones I > would have predicted, I am usually very glad I didn't over-engineer the API > in advance. W.r.t. "over-engineer", tongue-in-cheek: https://www.youtube.com/watch?v=XewVicFzRxw&t=2m44s -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Keyword namespacing best practices
I'd prefer an option map over kwargs in general, and I wouldn't namespace the options because they're not something that I'd expect to stick around. (fetch url {:timeout 10}) Regarding the output, if it's a Ring response map, I'd be inclined to leave the keywords bare for compatibility. If it's not, then namespaced keywords become more tempting to me, so long as the namespace can be aliased for brevity: (api/fetch url {:timeout 10}) => #::api{:status 200, :body ""} On Mon, 1 Oct 2018 at 02:45, Michael Gardner wrote: > I'm looking for some feedback on keyword namespacing. Say you're writing > an API to be used by external clients that works something like this: > > (fetch url :timeout 10) > => {:status 200, :body "..."} > > Would you namespace the :status and :body keywords in the response? What > about the :timeout kwarg in the function call? Why or why not? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- James Reeves booleanknot.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ANN] com.walmartlabs/lacinia 0.30.0
Lacinia is an open-source implementation of Facebook's GraphQL specification, in Clojure. GraphQL is an outstanding approach to getting diverse clients and servers exchanging data cleanly and efficiently. GitHub repo: https://github.com/walmartlabs/lacinia Documentation: http://lacinia.readthedocs.io/en/latest/ Featured changes in 0.30.0: - Can now wrap individual items in a list, not just the entire list - Fix bug with attach-resolvers, if a resolve function is already attached -- Howard M. Lewis Ship Senior Mobile Developer at Walmart Labs (971) 678-5210 http://howardlewisship.com @hlship -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ANN] HoneySQL 0.9.4
https://github.com/jkk/honeysql SQL as Clojure data structures. Build queries programmatically -- even at runtime -- without having to bash strings together. This is a bug fix release: * #sql/inline nil should produce NULL. Fix #221. (@seancorfield) * #sql/inline :kw should produce "kw". Fix #224 via PR #225. (@vincent-dm) Note: this introduces a new protocol, Inlinable, which controls inline value rendering, and changes the behavior of #sql/inline :foo/bar to produce just "bar" (where it was probably invalid SQL before). * Alias expressions [:col :alias] are now checked to have exactly two elements. Fix #226. (@seancorfield) * Allow where and merge-where to be given no predicates. Fix #228 and PR #230. (@seancorfield, @arichiardi) * as alias is no longer split during quoting. Fix #221 and PR #231. (@gws) Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.