This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-10-31
Channels
- # ai (5)
- # announcements (11)
- # beginners (19)
- # biff (1)
- # calva (8)
- # cider (3)
- # clj-kondo (12)
- # clojure (97)
- # clojure-europe (39)
- # clojure-nl (1)
- # clojure-norway (74)
- # clojure-uk (35)
- # clojurescript (8)
- # component (8)
- # conjure (4)
- # cursive (13)
- # data-science (1)
- # datahike (55)
- # datomic (2)
- # emacs (3)
- # etaoin (6)
- # gratitude (1)
- # hoplon (12)
- # hyperfiddle (54)
- # introduce-yourself (1)
- # lsp (70)
- # missionary (40)
- # music (1)
- # off-topic (79)
- # re-frame (78)
- # releases (4)
- # sql (5)
- # squint (9)
- # tree-sitter (4)
- # xtdb (20)
Why is it still not able to disambiguate with the ^Runnable
tag?
It does work with (fn [] ...)
instead of #(...)
I think the hint gets lost with the anonymous function
The upcoming arg-tags feature in 1.12 will provide a different better way to say this
(^[Runnable] Thread. …)
Oh, a vector of parameter types?
Btw, why is it that the type hint is needed above in the first place? fn
s implement Runnable
, is that not apparent when compiled?
They also implement Callable which is an overload here
Sorry, that’s in the executor calls, not here
Here it’s because that fn is not typed as a Runnable, it’s just an expression with unknown type
There is some nonobvious complexity here between what that expression is and what it returns when invoked