On Thu, Oct 25, 2012 at 8:08 AM, Stuart Sierra
<the.stuart.sie...@gmail.com> wrote:
> I certainly did not anticipate this release causing significant problems for
> application or library developers, and if it did then I apologize.

The biggest problem is transitive dependency conflicts (as I had with
congomongo) because this is a very low-level library that is fairly
widely used. I agree with nearly all of your reasons for updating the
API but maintaining the former API as "deprecated" would have allowed
both application developers and other library maintainers to move at
their own pace instead of forcing lockstep upgrades on whole chains of
libraries. Deprecated in 0.2.0 and removed in 0.3.0 might have been
more appropriate.

> However, I will stand by the decision to update the API. data.json 0.1.x
> suffered from what I consider, in retrospect, to be poor design decisions.

Agreed.

>   - Converting field names to keywords by default can create invalid
> keywords.

This was the change that caused me the most work since I needed to
update all call sites in different ways depending on what the code
needed - and then spend a bunch of time carefully testing that I had
restored the correct behavior. Yes, the previous behavior could be
problematic but switching the default behavior of an API is very
disruptive. Since this wasn't mentioned in your "highlights", nor in
your Change Log, the first I knew of it was when a huge number of my
unit tests failed in mysterious ways :(

>   - Keywordization is controlled by a bare boolean argument with little
> indication of its function.

Agreed this was ugly. Having now restored my code's correct
functionality, I like the flexibility of the :key-fn approach.

>   - Inconsistent styles of optional arguments: read-json and write-json take
> booleans as bare arguments, json-str and print-json use keyword-value pairs.

Agreed.

>   - Parsing a string and parsing from a stream -- two very different
> operations -- are conflated in a single function.

Agreed.

>   - Functions are not consistently named: json-str, read-json, write-json

Agreed.

>   - Function names repeat the name of the library, rather than using
> namespaces.

Agreed.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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

Reply via email to