<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged arglist</title>
<link>https://ask.clojure.org/index.php/tag/arglist</link>
<description></description>
<item>
<title>Better generated arglists for map-&gt;SomeDefrecord</title>
<link>https://ask.clojure.org/index.php/12091/better-generated-arglists-for-map-somedefrecord</link>
<description>&lt;p&gt;If I define &lt;code&gt;(defrecord SomeDefrecord [foo])&lt;/code&gt;, its &lt;code&gt;map-&amp;gt;SomeDefrecord&lt;/code&gt; constructor arglist will be the following:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[m__7988__auto__]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is not quite friendly, and doesn't result in an ideal experience for users of &lt;code&gt;clojure.repl/doc&lt;/code&gt;, cider-nrepl, and any other runtime-based tool.&lt;/p&gt;
&lt;p&gt;So I would suggest that &lt;code&gt;:arglists&lt;/code&gt; for such constructors are based on the fields that the defrecord declares:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;:arglists '([{:keys [foo]}])&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This seems very simple to implement - have you considered adding this small but real improvement?&lt;/p&gt;
</description>
<category>Records and Types</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/12091/better-generated-arglists-for-map-somedefrecord</guid>
<pubDate>Mon, 01 Aug 2022 00:37:59 +0000</pubDate>
</item>
</channel>
</rss>