core.typed

(Array X) is broken and undocumented

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Blocker Blocker
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: Backlog
  • Component/s: Clojure Checker
  • Labels:
    None

Description

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.

Activity

Hide
Ambrose Bonnaire-Sergeant added a comment -

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.

Show
Ambrose Bonnaire-Sergeant added a comment - 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.
Hide
Marc O'Morain added a comment -

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.

Thanks

Show
Marc O'Morain added a comment - 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. Thanks
Hide
Ambrose Bonnaire-Sergeant added a comment -

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.

Show
Ambrose Bonnaire-Sergeant added a comment - 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.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: