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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>The naming convention docs explain <a href="https://hexdocs.pm/elixir/main/naming-conventions.html#trailing-bang-foo" rel="noopener nofollow ugc">here</a>.  Generally it’s what you say but they also give the example of <code>alias!</code> and <code>var!</code> from macros whose variants don’t return tuples (it is, after all, basically just a <em>much</em> better alternative to only matching on the <code>:ok</code> case).  It also points out that there are cases where there is a bang variant with no non-bang variant.  For those who are familiar with Ruby, this is differs says if you have a bang you also have a non-bang (again, just convention).  Though in Ruby it’s also often used to signify the mutation version of a method and many methods only mutate and just go with the non-bang (eg, <code>Array#delete</code>).  I always found this a bit confusing.</p>
<p>Getting back on track, though, in all cases in Elixir’s stdlib, <code>!</code> always signify’s something’s going to raise.  As much as I like to personally stick to this convention, I don’t think it’s a <em>huge</em> deal when people want to stray from it.  I think it can add a certain expressiveness in some domains.  In libraries it’s certainly <em>very</em> iffy but I still believe it’s up to the author.  Just my two cents, of course.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318623" 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/std-result-a-way-to-standardize-function-returns/61719/32">Post #31</a>
	                </div>
	            </div>
              <div id="likers-container-318623" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318623"
                     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 #31"></div>
  </section>
</div>
    <div class="postbit" id="318628" data-post-id="318628">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m surprised <a href="https://hexdocs.pm/exceptional/readme.html" rel="noopener nofollow ugc">exceptional</a> by Brooklyn Zelenka hasn’t been mentioned yet. It’s another, interesting approach for working with exceptions and tagged tuples.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318628" 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/std-result-a-way-to-standardize-function-returns/61719/33">Post #32</a>
	                </div>
	            </div>
              <div id="likers-container-318628" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318628"
                     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 #32"></div>
  </section>
</div>
    <div class="postbit" id="318631" data-post-id="318631">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’ve wanted similar and will toss out my own take on this concept with <a href="https://hexdocs.pm/ex_result/ExResult.html" class="inline-onebox" rel="noopener nofollow ugc">ExResult — ex_result v0.0.5</a> - Ultimately, I feel that this sort of concept would need to be an actual core <code>Result</code> type and it’s just not. Any of these utilities attempting to inject their own take on a result type sadly will be fighting years of conventions and developer understanding. Regardless, I think it’s worthwhile to find ways to standardize for your own team.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318631" 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/std-result-a-way-to-standardize-function-returns/61719/34">Post #33</a>
	                </div>
	            </div>
              <div id="likers-container-318631" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318631"
                     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 #33"></div>
  </section>
</div>
    <div class="postbit" id="318647" data-post-id="318647">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Damn, I look at the examples and it feels like a foreign language:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[1,2,3] ~&gt; Enum.sum()
#=&gt; 6

Enum.OutOfBoundsError.exception("exception") ~&gt; Enum.sum
#=&gt; %Enum.OutOfBoundsError{message: "exception"}

[1,2,3]
|&gt; hypothetical_returns_exception()
~&gt; Enum.map(fn x -&gt; x + 1 end)
~&gt; Enum.sum()
#=&gt; %Enum.OutOfBoundsError{message: "exception"}

0..10
|&gt; Enum.take(3)
~&gt; Enum.map(fn x -&gt; x + 1 end)
~&gt; Enum.sum()
#=&gt; 6
</code></pre>
<p><img src="https://forum.elixirforum.com/images/emoji/apple/clown_face.png?v=15" title=":clown_face:" class="emoji" alt=":clown_face:" loading="lazy" width="20" height="20"> What is going on here?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318647" 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/std-result-a-way-to-standardize-function-returns/61719/35">Post #34</a>
	                </div>
	            </div>
              <div id="likers-container-318647" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318647"
                     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 #34"></div>
  </section>
</div>
    <div class="postbit" id="318992" data-post-id="318992">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I find that VS Code os flaky with this - perhaps someone has a vscode settings for live_view, elixir and phoenix that they’s be willing to share.</p>
<p>I use the example on the blog by Pragmatic studio.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="318992" 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/std-result-a-way-to-standardize-function-returns/61719/36">Post #35</a>
	                </div>
	            </div>
              <div id="likers-container-318992" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="318992"
                     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>