[CTYP-231] (Array X) is broken and undocumented Created: 23/Jun/15 Updated: 20/Jul/15
|Reporter:||Marc O'Morain||Assignee:||Ambrose Bonnaire-Sergeant|
There is no documentation about (Array X) in the API docs: http://clojure.github.io/core.typed/#clojure.core.typed - it was hard to find our that such a thing existed.
|Comment by Ambrose Bonnaire-Sergeant [ 23/Jun/15 8:26 AM ]|
Unfortunately it's intentional. It's a long standing issue, one that I've thought long and hard about, but Arrays broken right now. The main problem is that there is no distinction between an array of boxed values and an array of unboxed values – you can upcast from one the other.
I will put this near the top of the list of things to do.
|Comment by Marc O'Morain [ 23/Jun/15 8:39 AM ]|
We have a few uses of Array in our code-base. The few I have been touching today are for annotating clojure.java.io signatures. We don't use the byte forms of the functions at present, so we should be OK for now.
|Comment by Ambrose Bonnaire-Sergeant [ 23/Jun/15 8:50 AM ]|
The implementation is fast and loose about the distinction of byte and Byte too – they're pretty much identical, since Clojure does the appropriate coercions at runtime. Also be careful about that.