<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="257976" data-post-id="257976">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="hst337" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  hst337
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I love that proposal, I’ve raised this as one of my points <a href="https://forum.elixirforum.com/t/four-years-of-elixir-erlang-otp/49214" rel="nofollow">here</a> and I think it will solve the problem of two ways of expressing strings.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>If single quotes raised/warned in the future, would that lead to better learning and user experience?</p>
</blockquote>
</aside>
<p>I think it will, but there are a few other things we need to keep in mind.</p>
<ol>
<li>I think that compiler shouldn’t raise more than one warning for dependencies</li>
<li>We need to do something about <code>string()</code> type (maybe warn too?)</li>
<li>We need to create a crawler which will translate old elixir codebases to use sigils instead of charlists</li>
</ol>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>If <code>[97, 98, 99]</code> prints as <code>~c"abc"</code> in IEx instead of <code>'abc'</code>, is that more, less, or equally confusing? (let’s assume for now that we will either print one or the other, in order to avoid side-tracking the discussion)</p>
</blockquote>
</aside>
<p>I think that printing <code>~c""</code> version is the best decision, because it won’t break any software which was used to grep logs or errors, but it’ll give an idea that <code>''</code> is deprecated</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="257976" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-257976" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="257976"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="257977" data-post-id="257977">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="crispinb" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/crispinb/120/22642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  crispinb
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="joey_the_snake" data-post="12" data-topic="49455" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/j/c37758/48.png" class="avatar"> joey_the_snake:</div>
<blockquote>
<p>It’s a good thing for newcomers who are using charlists by mistake when they don’t want to.</p>
<p>If you aren’t new and want to use charlists it seems slightly more annoying but not the biggest deal.</p>
</blockquote>
</aside>
<p>It seems very weird to me to optimise any aspect of a language for the first hour or day of learning. I’m as poor a programmer as exists anywhere  (possibly the only long-term unemployed developer in the contemporary world!), am not that distant from the time when I first came across Elixir (ie. I remember what starting with it was like), and can say with 100% certainty that there’s no way the <code>'</code>/<code>"</code> distinction could have caused more than a 1 minute confusion.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="257977" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-257977" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="257977"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="257980" data-post-id="257980">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="cjbottaro" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/cjbottaro/120/1469_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  cjbottaro
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m indifferent, despite having to explain charlists to newcomers several times.</p>
<p>I saw some proposal somewhere (can’t remember) of deprecating/removing charlists from Erlang/Beam entirely… I understand why that’s not feasible, but… one can dream… <img src="https://forum.elixirforum.com/images/emoji/apple/innocent.png?v=15" title=":innocent:" class="emoji" alt=":innocent:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="257980" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-257980" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="257980"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="258008" data-post-id="258008">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Eiji" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Eiji/120/36743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Eiji
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="fuelen" data-post="8" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/fuelen/48/9870_2.png" class="avatar"> fuelen:</div>
<blockquote>
<p>In order to avoid confusion at all, the list of integers should be printed as list of integers. In general, I don’t care. I don’t interact with charlists often.</p>
</blockquote>
</aside>
<p>Well … in that way we could remove all syntax sugar in <code>Elixir</code>. <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"></p>
<p>Example question:</p>
<blockquote>
<p>Why <code>{:ok, number}</code> becomes map <code>[ok: number]</code>?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule Example do
  def sample(number), do: {:ok, number + number}
end

iex&gt; for number &lt;- 1..10, do: &gt; Example.sample(number)
[ok: 2, ok: 4, ok: 6, ok: 8, ok: 10, ok: 12, ok: 14, ok: 16, ok: 18, ok: 20]
</code></pre>
</blockquote>
<p>and someone may say we should print every keyword like a normal list <code>[{:key, value}, …]</code> as printed result may be confusing for newbies.</p>
<p>The key point here is to keep as much as we can and try to not confuse. There would be <strong>always</strong> some difference with other languages and there would always be some features newbies does not know about.</p>
<p>One time someone tries to force me to write code without pipes as new developers does not know how pipe works. Instead he used a nested, nested, nested … case/cond/if and code he describes as “easy to read” had something like 13 indention levels in one line … <img src="https://forum.elixirforum.com/images/emoji/apple/smiling_imp.png?v=15" title=":smiling_imp:" class="emoji" alt=":smiling_imp:" loading="lazy" width="20" height="20"></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258008" data-batch-url="/posts/batch_likers">
                        2
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-258008" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258008"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="258019" data-post-id="258019">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="LostKobrakai" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/LostKobrakai/120/3072_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  LostKobrakai
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>We are considering deprecating <code>'charlists'</code> in Elixir in favor of <code>~c"charlist"</code>.</p>
</blockquote>
</aside>
<p>I’d expect this to be a useful change. Raising the signal of differenciating binaries from charlists should be a net positive. Though I’m not sure about the use of double quotes as the sigil delimiters. They might be more confusing to people unaware of charlists, but I’d probably prefer them as someone aware of them.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>If single quotes raised/warned in the future, would that lead to better learning and user experience?</p>
</blockquote>
</aside>
<p>I don’t think we can get rid of the need of being aware of charlists and what they are/how they work. So the best we can do is make people aware of them earlier, rather than later, at dev/built time, rather than in production. This change would support that.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>If <code>[97, 98, 99]</code> prints as <code>~c"abc"</code> in IEx instead of <code>'abc'</code>, is that more, less, or equally confusing?</p>
</blockquote>
</aside>
<p>I’d argue both are equally confusing. But I don’t think they’re equal in helping people to resolve that confusion.</p>
<p>To someone unaware of charlists and the fact that single quote are not interchangable with double quotes in elixir <code>'abc'</code> doesn’t hold any signal of “this is something you don’t know about yet”. At best they wonder why there’s single quotes suddenly, but from my experience that doesn’t help much without knowing the significance of that. <code>~c"abc"</code> on the other hand does hold more signal, even if the person might still wonder why there’s a sigil in front of the “string”. It hopefully leads them to learning about sigils (if unknown before) and <code>sigil_c</code> docs will lead them to learn about charlists.</p>
<p>Having provided explanations to many on slack as well as having tried to improve <a href="https://hexdocs.pm/elixir/List.html#module-charlists" rel="nofollow">the documentation</a> of charlists a few years ago I still feel like the most difficult part of explaining charlists is the fact that formatting a charlists as text is only a matter of  representation of a list of integers, but it doesn’t mean it’s not a list of integers anymore. Using sigils hopefully makes this less mind bending, given other sigils are also used to represent a certain value via a different representation of it. <code>~D[2022-08-10]</code> is a textual representation of a date struct, <code>~r/\d*/</code> defines a regex struct via its text format, …. At best people might have been in contact with sigils before, but given how many code challenges/katas/… accidentally produce charlists this is certainly nothing to rely on.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258019" data-batch-url="/posts/batch_likers">
                        7
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-258019" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258019"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="258026" data-post-id="258026">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Adzz" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Adzz/120/10743_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Adzz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<blockquote>
<p>formatting a charlists as text is only a matter of representation…</p>
</blockquote>
<p>I agree and was coming to make the same point. In my experience helping newcomers, the confusion stems from people assuming that <code>'abc'</code> is a string - because it would be in other languages and it’s a reasonable assumption.</p>
<p>If it becomes <code>~c"abc"</code> it’s now clear that we are not talking about a string which should help remove the confusion and prompt them to look up the <code>~c</code> sigil.</p>
<p>There is definite value in being able to see both representations (the numbers in the list OR the characters they refer to) but usually when we write charlists we think in letters, ie we write <code>'abc'</code> and not <code>[97, 98, 99]</code>.</p>
<p>So I think <code>[97, 98, 99]</code> should be printed as <code>[97, 98, 99]</code>, but if you write the sigil it’s printed as <code>~c"abc"</code>.</p>
<p>Big plus one on the proposal and +1 for printing as <code>~c"abc"</code> from me.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258026" data-batch-url="/posts/batch_likers">
                        3
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-258026" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258026"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="258027" data-post-id="258027">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="msz" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  msz
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Great idea. Not only this gives more signal about what is happening, but also it simplifies the language by reusing an existing thing (sigil) in place of a separate one (single quote) in an intuitive way.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258027" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-258027" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258027"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="258030" data-post-id="258030">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="NobbZ" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/NobbZ/120/27235_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  NobbZ
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I remember we have already been into this, at least partially and reverted the behaviour…</p>
<p>IIRC the situation we have been in was roughly the following:</p>
<ol>
<li>Inspection used <code>sigil_c</code> instead of single-quotes</li>
<li>Usage of singlequotes was at least soft deprecated</li>
</ol>
<p>Though both of this has been reverted within the same minor release via a patch release or in the next minor. (I do not remember exactly)</p>
<p>I also do not remember the exact reasoning behind reverting the behaviour.</p>
<p>What has changed since then?</p>
<p>PS: I am happy about this change, and use <code>sigil_c</code> in my own code base since when the mentioned deprecation was active!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258030" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-258030" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258030"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #19"></div>
  </section>
</div>
    <div class="postbit" id="258037" data-post-id="258037">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="al2o3cr" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/al2o3cr/120/3457_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  al2o3cr
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Nitpick: the printed form should be <code>~C"chars"</code> since <code>~c"foo #{bar}"</code> will try to interpolate <code>bar</code></p>
<hr>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="1" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/48/1787_2.png" class="avatar"> josevalim:</div>
<blockquote>
<p>If <code>[97, 98, 99]</code> prints as <code>~c"abc"</code> in IEx instead of <code>'abc'</code>, is that more, less, or equally confusing? (let’s assume for now that we will either print one or the other, in order to avoid side-tracking the discussion)</p>
</blockquote>
</aside>
<p>Having answered a fair number of these, I don’t think anything short of a one-time message from IEx, “Hey, I just printed that thing that looked like a charlist as a charlist. Read this doc if that wasn’t what you wanted” would solve the problem. <code>~C</code> is a tiny bit more google-able but not by much, and “I entered <code>~C(hi there)</code> but IEx thinks it’s <code>~C"hi there"</code> halp” posts could appear.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258037" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-258037" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258037"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #20"></div>
  </section>
</div>
    <div class="postbit" id="258039" data-post-id="258039">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="dimitarvp" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/120/38664_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  dimitarvp
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="LostKobrakai" data-post="17" data-topic="49455">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/lostkobrakai/48/3072_2.png" class="avatar"> LostKobrakai:</div>
<blockquote>
<p><code>~c"abc"</code> on the other hand does hold more signal, even if the person might still wonder why there’s a sigil in front of the “string”. It hopefully leads them to learning about sigils (if unknown before) and <code>sigil_c</code> docs will lead them to learn about charlists.</p>
</blockquote>
</aside>
<p>Yes and no. I helped people learn Elixir off-forum and while <code>iex</code> printing <code>~D[2020-07-10]</code> does tell them that this is something special they have to look into, on the other side of the coin <code>iex</code> does not make it easy to search for sigil’s docs or understand what a sigil even <em>is</em>.</p>
<p>Try typing e.g. <code>h ~S</code> in <code>iex</code> – you get an error. You have to <em>know what you are looking for in the first place</em> and type <code>h sigil_S</code> which IMO kind of defeats the purpose of having something that can guide the learner without them having to go to a website [to learn about sigils].</p>
<hr>
<p>I propose this be expanded to 3 action points:</p>
<ul>
<li>Print charlists as integer lists by default in <code>iex</code></li>
<li>Do use the new canonical form of <code>~c"something"</code></li>
<li>Change <code>iex</code> and/or the <code>h</code> helper so that it can understand queries like <code>h ~c</code></li>
</ul>
<p>Having all three would IMO allow people to self-onboard. They type ‘abc’ in <code>iex</code> and see <code>~c"abc"</code> and then intuitively they would do <code>h ~c</code> and would get an explanation. Of course that assumes they know about <code>iex</code> and <code>h</code> in the first place, sure <img src="https://forum.elixirforum.com/images/emoji/apple/smiley.png?v=15" title=":smiley:" class="emoji" alt=":smiley:" loading="lazy" width="20" height="20"> but hey, we have to start somewhere.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="258039" data-batch-url="/posts/batch_likers">
                        4
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/convert-charlists-into-c-charlists/49455/22">Post #21</a>
	                </div>
	            </div>
              <div id="likers-container-258039" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="258039"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #21"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/49455/load_more?page=3">Load more posts (25 remaining)</a>
</div></template></turbo-stream>