<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">What does map(string, string) do if I insert many keys that have the same value, does it re-share that string value?<div class="">My particular use case is for something in my language called a type map, which looks a little like this:<div class=""><br class=""></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class="">(#f:typemap ;; has to work as (alist... as well!<br class="">        :VARIABLES {<br class="">            ('argc' . "psz")<br class="">            (argv   . char**)<br class="">            (argv   . :ppc)<br class="">        }<br class="">        :Types {<br class="">            "int”         i</font></div><div class=""><span style="font-family: LektonNerdFontCompleteM-Regular;" class="">            “int”         [ j k n ]</span></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class="">            "char"        [ c ch chr ]<br class="">            "const char*" psz<br class="">            "char**"      ppc<br class="">        }<br class="">)</font></div><div class=""><br class=""></div><div class="">The :variables section defines types for variables explicitly, no type decoration is needed in the source code. The :types section allows aliases to be specified. The keys are mixed case as an ongoing test, but my question is, when I process it the following map entries will be made</div><div class=""><br class=""></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>i<span class="Apple-tab-span" style="white-space:pre">   </span>int</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>j<span class="Apple-tab-span" style="white-space:pre">   </span>int</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>k<span class="Apple-tab-span" style="white-space:pre">   </span>int</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>n<span class="Apple-tab-span" style="white-space:pre">   </span>int</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>c<span class="Apple-tab-span" style="white-space:pre">   </span>char</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>ch<span class="Apple-tab-span" style="white-space:pre">  </span>char</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>chr<span class="Apple-tab-span" style="white-space:pre"> </span>chr</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>psz<span class="Apple-tab-span" style="white-space:pre"> </span>const char*</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">  </span>ppc<span class="Apple-tab-span" style="white-space:pre"> </span>char**</font></div><div class=""><br class=""></div><div class="">I am doing this just because it feels easier later i.e. when I split a variable into its name and type I act thus:</div><div class=""><br class=""></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">     </span>var<span class="Apple-tab-span" style="white-space:pre"> </span>        find type in :variables section, further resolved from :types</font></div><div class=""><font face="LektonNerdFontCompleteM-Regular" class=""><span class="Apple-tab-span" style="white-space:pre">    </span>var ’/‘ type<span class="Apple-tab-span" style="white-space:pre">    </span>find type in :types section</font></div><div class=""><br class=""></div><div class="">Perhaps there is even some other storage mechanism that the libraries offer? To be honest, I am on a roll with it this evening and I want to just complete this part of the transpiler system as I have spent far too long on it already!</div><div class="">Suggestions welcome as always.</div><div class=""><br class=""></div><div class="">Thank you all,</div><div class="">Sean.</div><div class=""><br class=""></div></div></body></html>