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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>This was the thread I think? which announced there will be a second poll at some point to get community feedback, which seems really split <a href="https://forum.elixirforum.com/t/changes-to-the-struct-update-syntax/71232" class="inline-onebox" rel="nofollow">Changes to the struct update syntax</a></p>
<p>If that is where we’re headed, not so much a workaround as you will get type warnings unless you pattern match before updating the struct with that syntax. So if you don’t really use that syntax (which seems to be most of the people ok with deprecating it and don’t feel strongly really), then it will be just prodding you toward best practices with pattern matching (which hopefully you were already doing). If you <em>were</em> using that syntax heavily as a type guarantee, you will have to do something more than (not necessarily instead of) what you were doing.</p>
<p>It’s honestly not quite clear to me if pattern matching is “better than” struct update in terms of guarantees it provides. It seemed like that’s what José was saying but I didn’t dig in enough to follow.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="377644" 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/which-elixir-version-s-are-you-still-using-on-your-non-pet-projects/73122/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-377644" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="377644"
                     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 #11"></div>
  </section>
</div>
    <div class="postbit" id="377645" data-post-id="377645">
  <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="tfwright" data-post="12" data-topic="73122">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/tfwright/48/20299_2.png" class="avatar"> tfwright:</div>
<blockquote>
<p>It’s honestly not quite clear to me if pattern matching is “better than” struct update in terms of guarantees it provides.</p>
</blockquote>
</aside>
<p>Aha, that’s why I never stumbled upon this problem in my hobby projects recently: I always do both. Thank you.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="377645" 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/which-elixir-version-s-are-you-still-using-on-your-non-pet-projects/73122/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-377645" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="377645"
                     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="377662" data-post-id="377662">
  <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>We often have it in situations where we indeed expect crashes:</p>
<pre data-code-wrap="ex"><code class="lang-ex">%S{super(data) | date: decode_date(data["date"]) }
</code></pre>
<p>In our deserialisation abstraction now has to be written as:</p>
<pre data-code-wrap="ex"><code class="lang-ex">data = %S{} = super(data)

%S{ data | date: decode_date(data.date) }
</code></pre>
<p>This is about 75% of the occurrences I did change so far.</p>
<p>We also played with using <code>Map.put/3</code> and the <code>Map.update</code>s, though to me it felt wrong using it on structs. Also I lost that when doing some git acrobatics to split a single huge (and erroneous commit) I to several commits I can ship in multiple MRs for easier reviewability.</p>
<p>I am done with yesterday’s runtime code now, but I still have tests to adjust. And at least till we actually update, I’ll have to check the prod code regularly with both versions of elixir.</p>
<p>Removing <code>--warnings-as-errors</code> from our pipeline is not an option.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="377662" 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/which-elixir-version-s-are-you-still-using-on-your-non-pet-projects/73122/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-377662" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="377662"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>