Cloje 0.2 Status Update

I previously posted that I was planning Cloje 0.2 to have a variety of new features, and aiming to release it in mid to late June. However, for a number of reasons, I am reducing the scope of version 0.2, and moving the target release date to July 5.

Cloje 0.2 will definitely include the hash-set data structure, and a library of set operations based on clojure.set, as previously written.

I am also working on establishing an API for converting data between Cloje and host-language types. At the moment, Cloje mostly uses the host language’s native data types, so the API will mostly do nothing, but it’s important to have the API available early on. For one thing, it allows users to write forward-compatible code that interoperates with the host language, and will continue to work even if I change how Cloje data structures are implemented. But more importantly, it forces me to think about how host-interop will work, so that potential issues will come to light early in the design process.

Those are the two main features planned for 0.2. It doesn’t feel like much compared to 0.1, to be honest. I considered delaying the release even further so I could put more into it, but that is a perilous and often self-defeating strategy. I think it will be better for the project, and for my own motivation, to have a consistent release schedule, even if that means more modestly sized releases.

Even so, Cloje 0.2 will be an especially small release. This is mainly because I spent the majority of my Cloje time over the past 6 weeks doing research and thinking and planning about open source project management, particularly as it relates to diversity and inclusivity. More writing about that, and announcements of project policy and efforts along those lines, is forthcoming.

Surprises in clojure.set

[Update August 2, 2015: Parts of this post have been revised to “tone down the snark”. This post was a byproduct of frustration with the design of the clojure.set API, but in some places I had expressed that frustration in ways that were merely cathartic and sensational, not constructive or informative.]

Lately I have been implementing the clojure.set API for Cloje, and as usual, Clojure’s APIs are full of surprises, particularly if you pass unexpected types.

Indeed, every clojure.set function I have looked at so far has its own peculiar way of handling this obvious edge case. In general, the lack of type checking results in unexpected or unpredictable behavior that may confuse the user and make bugs harder to diagnose.

Let’s start with some fairly mundane examples, then work our way up to the truly puzzling. I’ll then explain why this is a problem, and describe how I’m addressing it in Cloje. Continue reading Surprises in clojure.set