This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-29
Channels
- # announcements (1)
- # biff (5)
- # calva (10)
- # cljdoc (4)
- # clojure (17)
- # clojure-europe (15)
- # clojure-norway (38)
- # clojurescript (53)
- # community-development (1)
- # cursive (2)
- # datomic (14)
- # fulcro (11)
- # funcool (1)
- # hyperfiddle (7)
- # introduce-yourself (2)
- # jobs-discuss (17)
- # missionary (7)
- # releases (4)
- # shadow-cljs (30)
- # slack-help (6)
- # specter (5)
- # squint (22)
Is it possible to typehint return type or arguments for protocol functions?
The return type hint goes in a different place - before the protocol name instead of before the param vector
like this https://github.com/thheller/shadow-grove/blob/626c09e82ba2b4eeac2cf04eb31c1f4f6373d374/src/main/shadow/arborist/protocols.cljs#L6 for return type
Oh, huh. I saw such instances, but I thought it was the mistake that people make with regular functions.
Are there any downsides in making it also accept the (supports? ^boolean [this next])
syntax in Clojure?
Ah, this is embarrassing but I think I put the hint before function name on normal functions on occasions
In that case you are hinting the var, which does still work (except for long or double primitive type hints)
Well, I learned something I guess 🙂
thanks
Did the changes.md
file get updated for Clojure 1.11.2 that released earlier this month? On this page, https://clojure.org/releases/downloads, it links to the changes.md
file on GitHub, but that file seems to have been last touched for Clojure 1.11.1, on April 1, 2022.
I think @U064X3EF3 mentioned that updating the change log for 1.11.2 was on his todo list but it hasn't happened yet?
Yeah, I’ll get it when we update for 1.12
Thanks, no worries. Just wanted to make sure that it wasn’t me. I’ll just browse the commits for now.
I think the only change between 1.11.1 and 1.11.2 is the fix for the CVE (which is listed in 1.12 Alpha 9 change log notes).
Thanks, @U04V70XH6.
It was intended to be a very small and safe change for upgrade