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


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="124" data-topic="60130">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>We have well-working constructs to solve that problem but you have clearly shown that you don’t want the legitimacy of the problem called into question, so OK.</p>
</blockquote>
</aside>
<p>It is fine to question the legitimacy, as long as it is accurate and constructive. Calling it a toy problem is neither. You could instead have asked: “can you provide more context about the problem statement?”. Also, it is not hard for us to try to find where we can apply this to.</p>
<p>I grepped Livebook and I found this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">{sections, {_branching_ids, warnings}} =
  notebook.sections
  |&gt; Enum.with_index()
  |&gt; Enum.map_reduce({MapSet.new(), []}, fn {section, section_idx},
                                            {branching_ids, warnings} -&gt;
    # Set parent_id based on the persisted branch_parent_index if present
    case section.parent_id do
      nil -&gt;
        {section, {branching_ids, warnings}}

      {:idx, parent_idx} -&gt;
        parent = Enum.at(notebook.sections, parent_idx)

        cond do
          section_idx &lt;= parent_idx -&gt;
            {%{section | parent_id: nil},
              {
                branching_ids,
                [
                  ~s{ignoring the parent section of "#{section.name}", because it comes later in the notebook}
                  | warnings
                ]
              }}

          !is_nil(parent) &amp;&amp; MapSet.member?(branching_ids, parent.id) -&gt;
            {%{section | parent_id: nil},
              {
                branching_ids,
                [
                  ~s{ignoring the parent section of "#{section.name}", because it is itself a branching section}
                  | warnings
                ]
              }}

          true -&gt;
            {%{section | parent_id: parent.id},
              {MapSet.put(branching_ids, section.id), warnings}}
        end
    end
  end)
</code></pre>
<p>and with this proposal that could be rewritten to:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">
  @@warnings = []
  @@branching_ids = MapSet.new()

  for {section, section_idx} &lt;- Enum.with_index(notebook.sections) do
    case section.parent_id do
      nil -&gt;
        section

      {:idx, parent_idx} -&gt;
        parent = Enum.at(notebook.sections, parent_idx)

        cond do
          section_idx &lt;= parent_idx -&gt;
            @@warnings = [
              ~s{ignoring the parent section of "#{section.name}", because it comes later in the notebook}
              | @@warnings
            ]
    
            %{section | parent_id: nil}
    
          !is_nil(parent) and MapSet.member?(@@branching_ids, parent.id) -&gt;
            @@warnings = [
              ~s{ignoring the parent section of "#{section.name}", because it is itself a branching section}
              | @@warnings
            ]
    
            %{section | parent_id: nil}
    
          true -&gt;
            @@branching_ids = MapSet.put(@@branching_ids, section.id)
            %{section | parent_id: parent.id}
        end
    end
  end)
</code></pre>
<p>Is it better? Worse? You decide.</p>
<p>So if we want to question the problem statement, let’s put the work into it. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" 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="310189" data-batch-url="/posts/batch_likers">
                        16
                      </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/local-accumulators-for-cleaner-comprehensions/60130/127">Post #126</a>
	                </div>
	            </div>
              <div id="likers-container-310189" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310189"
                     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 #126"></div>
  </section>
</div>
    <div class="postbit" id="310191" data-post-id="310191">
  <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 group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="60130">
<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>Is it better? Worse? You decide.</p>
</blockquote>
</aside>
<p>Both are confusing as hell. <img src="https://forum.elixirforum.com/uploads/default/original/2X/6/6c3193d1dd46244da3c8c6f719c9f5e2abdd5ae8.gif?v=15" title=":003:" class="emoji emoji-custom" alt=":003:" loading="lazy" width="20" height="20"> I would immediately break this code in smaller chunks.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="60130">
<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>It is fine to question the legitimacy, as long as it is accurate and constructive.</p>
</blockquote>
</aside>
<p>Let’s write it off as cultural differences then? I am here for quite a long time, I’d think you would know that I don’t argue in bad faith. I engage because I care.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="60130">
<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>So if we want to question the problem statement, let’s put the work into it. <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>Here we are in full agreement. I’ve copied the code from the archived repo and will attempt to devise a better idiomatic Elixir that could make the case for enriched <code>for</code> (or other constructs). Might have a crack at the Livebook snippet as well (will look if that code in particular is covered with tests so as to be as close to the original problem as possible, too).</p>
<p>The tricky bit is that I am actively onboarding in a new job so I have to prioritize that. And I am afraid I’ll miss the train on this proposal but oh well.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310191" 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/local-accumulators-for-cleaner-comprehensions/60130/128">Post #127</a>
	                </div>
	            </div>
              <div id="likers-container-310191" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310191"
                     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 #127"></div>
  </section>
</div>
    <div class="postbit" id="310192" data-post-id="310192">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="dimitarvp" data-post="128" data-topic="60130">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>Both are confusing as hell. <img src="https://forum.elixirforum.com/uploads/default/original/2X/6/6c3193d1dd46244da3c8c6f719c9f5e2abdd5ae8.gif?v=15" title=":003:" class="emoji emoji-custom" alt=":003:" loading="lazy" width="20" height="20"> I would immediately break this code in smaller chunks.</p>
</blockquote>
</aside>
<p>Agreed, they both could be better. I went for the trivial conversion.</p>
<aside class="quote no-group" data-username="dimitarvp" data-post="128" data-topic="60130">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/dimitarvp/48/38664_2.png" class="avatar"> dimitarvp:</div>
<blockquote>
<p>I engage because I care.</p>
</blockquote>
</aside>
<p>Definitely. That was never into question. <img src="https://forum.elixirforum.com/images/emoji/apple/heart.png?v=15" title=":heart:" class="emoji" alt=":heart:" loading="lazy" width="20" height="20"> I just don’t want problems to be dismissed for the wrong reasons.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310192" data-batch-url="/posts/batch_likers">
                        5
                      </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/local-accumulators-for-cleaner-comprehensions/60130/129">Post #128</a>
	                </div>
	            </div>
              <div id="likers-container-310192" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310192"
                     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 #128"></div>
  </section>
</div>
    <div class="postbit" id="310197" data-post-id="310197">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="gpopides" data-post="46" data-topic="60130">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/g/48db29/48.png" class="avatar"> gpopides:</div>
<blockquote>
<p>Could local accumulators be a feature of the for comprehension instead of general feature?</p>
</blockquote>
</aside>
<p>That’s very much acceptable I think</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310197" 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/local-accumulators-for-cleaner-comprehensions/60130/130">Post #129</a>
	                </div>
	            </div>
              <div id="likers-container-310197" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310197"
                     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 #129"></div>
  </section>
</div>
    <div class="postbit" id="310199" data-post-id="310199">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t have many restaurants invested in either side of this discussion, but I don’t understand the strong opposition.</p>
<p>Many of the people against it seem to be very «I wouldn’t need this» in how they argue and I think our lens should be more neutral.</p>
<p>Jose didn’t say (I think?) why he wanted to come up with this or what inspired him, but I would put my two cents on it coming from the livebook side of things.</p>
<p>If you work with system or web dev you do the occasional Enum spaghetti wrangling which is fine. If you work in Livebook all day as a data scientist you do this all day all week.</p>
<p>I think Elixir as a language would have a lot of benefit in making the lives of these people simpler. I haven’t done a survey to put it like that, but purity in functional style is probably not the main allure of Livebook.</p>
<p>I can certainly see this making data wrangling scripts and such becoming both quicker to writer and easier to read at a glance with this addition.</p>
<p>And I say that as someone who only really sometimes miss early returns (which can always be solved by breaking your logic up in smaller pieces and into a <em>with</em> chain) after about ten years with Elixir as my daily professional driver.</p>
<p>Someone wrote that Elixir should be striving for less syntax. I strongly disagree. Elixirs core selling point has always been to stand on Erlangs shoulders. And those shoulders has been defined by a single word: <em>pragmatism</em>.</p>
<p>This change caters to pragmatism through and through.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310199" data-batch-url="/posts/batch_likers">
                        10
                      </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/local-accumulators-for-cleaner-comprehensions/60130/131">Post #130</a>
	                </div>
	            </div>
              <div id="likers-container-310199" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310199"
                     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 #130"></div>
  </section>
</div>
    <div class="postbit" id="310200" data-post-id="310200">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I can surely see several places in some of my codebases where a construct like this would have saved me from <em>reducer</em>-hell.</p>
<p>As most of you I hate the <code>@@</code>, which is why I think it is a good solution.</p>
<p>I have seen the proposal of introducing a keyword <code>mut</code> or likewise and then use a generic variable name.<br>
This would make it impossible to see if a variable is a <em>mutable</em> one easily further in your code.</p>
<p>I have also read the comment by <a class="mention" href="/u/d4no0" rel="nofollow">@D4no0</a> and the example</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">@@magic_value = 20
Enum.map([1, 2 ,3], fn el -&gt; if el == :rand.uniform(3), do: @@magic_value = 21 end)
</code></pre>
<p>Now reading <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>’s description I know the above code will not change <code>@@magic_value</code> as it is in another scope, a new function, but it is confusing as hell.</p>
<p>Therefore, don’t shoot me, I would prefer the declaration of said variables to be explicit, but still keep the <code>@@</code> prefix</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">mut @@magic_value = 20
</code></pre>
<p>This would enable the compiler to catch trying to assign a value to a non-declared variable inside said scope.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310200" 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/local-accumulators-for-cleaner-comprehensions/60130/132">Post #131</a>
	                </div>
	            </div>
              <div id="likers-container-310200" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310200"
                     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 #131"></div>
  </section>
</div>
    <div class="postbit" id="310205" data-post-id="310205">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>When I was reading this proposal I had mix feelings <img src="https://forum.elixirforum.com/images/emoji/apple/laughing.png?v=15" title=":laughing:" class="emoji" alt=":laughing:" loading="lazy" width="20" height="20"></p>
<p>While sometimes I miss the ability to change a value in the middle of a <code>map</code>, I wouldn’t have thought to add it to the language. However, this solution offers scoped local accumulators, which is an interesting approach!</p>
<p>Currently, the flow is clear: you want to change two things(or more) at the same time? You have to pass both to the <code>Enum.map</code>. While this requires some data gymnastics, I’ve gotten used to it over time.</p>
<p>Something to consider is if local accumulators are introduced, it might split the community into two groups: those who use local accumulators and those who stick to ‘pure’ variables.</p>
<p>That said, If the intention is to help newcomers get on board faster, then it’s a decent solution.</p>
<p>It’s fantastic that we can implement this today without significant changes to the language. However, we all need some time to think about it and adjust our feelings and think about the consequences. From now on, whenever I write a function, I’ll be thinking about how I might have done things differently if I had local accumulators at my disposal.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310205" 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/local-accumulators-for-cleaner-comprehensions/60130/133">Post #132</a>
	                </div>
	            </div>
              <div id="likers-container-310205" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310205"
                     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 #132"></div>
  </section>
</div>
    <div class="postbit" id="310206" data-post-id="310206">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I read somewhere that they made the keyword <code>mutable</code> and not <code>mut</code> in F# to give you extra time to think about whether you really want to be using mutable variables <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" loading="lazy" width="20" height="20">.  I checked my [realtively small] F# codebase and there are three usages of <code>mutable</code>.  Two are because you can’t shadow variables like in Elixir and the other was in a 6 line function.  I think if this change happened, most people would continue to code in a functional manner.</p>
<p>Personally, I would prefer no <code>@@</code> and just to let the editor display the “mutable” value differently.  And as much as it bothers me writing <code>x = if something do ... else x end</code> I’m on the fence about <code>if something do @@x = 1 end</code>.</p>
<p>I too think that some of us are getting a little too excited about the apocalypse that this would bring.  It would be nice to have a couple of forks of Elixir with the options so we can have a play with it and see how it feels.</p>
<p>The community is already split on people who tag tuples in <code>with</code> and match on them in <code>else</code> and those that use <code>case</code>, those that add functions to <code>locals_without_parens</code> and those who use brackets, those who use the formatter and those who don’t.  Somehow we survive <img src="https://forum.elixirforum.com/images/emoji/apple/slight_smile.png?v=15" title=":slight_smile:" class="emoji" alt=":slight_smile:" 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="310206" 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/local-accumulators-for-cleaner-comprehensions/60130/134">Post #133</a>
	                </div>
	            </div>
              <div id="likers-container-310206" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310206"
                     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 #133"></div>
  </section>
</div>
    <div class="postbit" id="310207" data-post-id="310207">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="josevalim" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/120/1787_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  josevalim
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Elixir</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Hermanverschooten" data-post="132" data-topic="60130">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/hermanverschooten/48/6447_2.png" class="avatar"> Hermanverschooten:</div>
<blockquote>
<pre data-code-wrap="elixir"><code class="lang-elixir">@@magic_value = 20
Enum.map([1, 2 ,3], fn el -&gt; if el == :rand.uniform(3), do: @@magic_value = 21 end)
</code></pre>
<p>Now reading <a class="mention" href="/u/josevalim" rel="nofollow">@josevalim</a>’s description I know the above code will not change <code>@@magic_value</code> as it is in another scope, a new function, but it is confusing as hell.</p>
</blockquote>
</aside>
<p>In this case you would get a compilation error!</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310207" 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/local-accumulators-for-cleaner-comprehensions/60130/135">Post #134</a>
	                </div>
	            </div>
              <div id="likers-container-310207" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310207"
                     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 #134"></div>
  </section>
</div>
    <div class="postbit" id="310210" data-post-id="310210">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Why? Because you are shadowing the <code>@@magic_value</code>?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="310210" 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/local-accumulators-for-cleaner-comprehensions/60130/136">Post #135</a>
	                </div>
	            </div>
              <div id="likers-container-310210" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="310210"
                     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 #135"></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/60130/load_more?page=14">Load more posts (115 remaining)</a>
</div></template></turbo-stream>