<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged extend-protocol</title>
<link>https://ask.clojure.org/index.php/tag/extend-protocol</link>
<description></description>
<item>
<title>Protocol function with placeholder _ arguments doesn't work as in Clojure</title>
<link>https://ask.clojure.org/index.php/14469/protocol-function-with-placeholder-arguments-doesnt-clojure</link>
<description>&lt;p&gt;A protocol like below will work in Clojure without issue, but in ClojureScript the _'s will apparently (quietly) override each other left to right.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(defprotocol Linkable
  (-href [_ _ _]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Even if the extend-protocol has unique names for the args, the dispatch seems to happen on the last argument.&lt;/p&gt;
&lt;p&gt;Repro at &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/valerauko/proto-repro/commit/a8ad51a225ed44ed134b28a18cc83d272d0d8321&quot;&gt;https://github.com/valerauko/proto-repro/commit/a8ad51a225ed44ed134b28a18cc83d272d0d8321&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using distinct argument names in the defprotocol solves the issue. I think if it doesn't / can't work like in JVM Clojure it should warn about this issue.&lt;/p&gt;
</description>
<category>ClojureScript</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/14469/protocol-function-with-placeholder-arguments-doesnt-clojure</guid>
<pubDate>Mon, 17 Mar 2025 14:58:32 +0000</pubDate>
</item>
</channel>
</rss>