Fork me on GitHub
#clojure-dev
<
2024-02-09
>
seancorfield18:02:17

In the release notes for Alpha 6, there's a Functional Interfaces section where it says "Note: this will be available in a future alpha." but the Java Supplier Interop subsection did make it into Alpha 6. Curious about why the FI stuff got documented but didn't make the alpha, and whether there's a timeline in mind for it to make a future alpha?

Alex Miller (Clojure team)18:02:33

it's part of the story, so felt weird to leave it out, but the work needs to be rebased over the method values stuff. hopefully will be in the next alpha

seancorfield18:02:36

Cool. But no timeline for that yet?

Alex Miller (Clojure team)19:02:29

when do we ever do timelines :)

😈 1
😂 2
😭 1
seancorfield19:02:53

Haha... it was worth a try... 🙂

cfleming23:02:37

In the description for https://clojure.atlassian.net/browse/CLJ-2805, it says: > Type hints can be any type hint specification currently accepted -- fully-qualified class symbols, imported short class symbols, or “special” type hints representing primitives (like ^long, double, etc.) or arrays (like ^longs, ^objects, etc.), or strings. Does this mean that e.g. ^{:param-tags [^long]} MyClass/myMethod should work? i.e. with the ^ in ^long?

cfleming23:02:30

That looks like it should be a read error to me, but the description is a little ambiguous.

seancorfield23:02:44

Clojure 1.12 Alpha 7 rejects that:

user=> (^{:param-tags [^String]} java.net.URI/new "")
Syntax error reading source at (REPL:2:25).
Unmatched delimiter: ]
Syntax error reading source at (REPL:2:26).
Unmatched delimiter: }
Syntax error (IllegalArgumentException) compiling at (REPL:0:0).
Multiple matches for constructor in class java.net.URI, use param-tags to specify
""
Syntax error reading source at (REPL:2:63).
Unmatched delimiter: )
user=> (^{:param-tags [String]} java.net.URI/new "")
#object[java.net.URI 0x51dbd6e4 ""]
user=> (^[String] java.net.URI/new "")
#object[java.net.URI 0x5f303ecd ""]
user=> (^[^String] java.net.URI/new "")
Syntax error reading source at (REPL:5:12).
Unmatched delimiter: ]
Syntax error (IllegalArgumentException) compiling at (REPL:0:0).
Multiple matches for constructor in class java.net.URI, use param-tags to specify
""
Syntax error reading source at (REPL:5:49).
Unmatched delimiter: )
user=>

cfleming23:02:13

Which makes sense, I think.