Fork me on GitHub
#clojure-dev
<
2024-05-29
>
Jakub Holý (HolyJak)07:05:30

Hello! I have struggled to understand how to implement a multi-arity protocol method with a record, so I’d like to suggest an improvement to the https://github.com/clojure/clojure/blob/3eab1a5a5b4cfed86c1d0c9c21bd1892e1fb44fd/src/clj/clojure/core_deftype.clj#L344-L348 to make this clearer. Do I understand correctly that the right process is to create a Jira issue and attach a patch? (I’ve already signed the contrib. agreement). I am thinking about this change (new in cursive): > (methodname [args*] body) > > The argument and return types can be hinted on the arg and > methodname symbols. If not supplied, they will be inferred, so type > hints should be reserved for disambiguation. > > For multi-arity methods, add a separate (methodname ...) entry > for each one.

1
Noah Bogart11:05:07

the best first step is an Ask at http://ask.clojure.org and then if it isn't immediately dismissed, alex or jared will create a jira ticket

☝️ 2
1
🙏 1