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


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’d like a lisp that would compile into Elixir modules. It’s not very hard to do, only a little boring because of little details such as designing a sensible standard library, tooling, sourcemaps, etc. You would know, of course xD</p>
<p>Why Elixir and not Erlang?</p>
<p>First, being able to interoperate with Elixir macros is huge, and Elixir’s AST oddities (like <code>do</code> blocks and the internal <code>__block__</code> node) map relatively well to lisp’s <code>progn</code> or the scheme equivalents. With one or two helper macros, one could use Phoenix <em>as is</em>. This interoperability alone makes ir worth it to compile to Elixir instead of Erlang. Phoenix’s “guts” very well designed (PubSub, Channels, Presence), although one might dislike some surface characteristics. And Phoenix is so easy to customize that it doesn’t matter anyway.</p>
<p>Phoenix was basically the only reason I went for Elixir instead of LFE. One can debate the timeless beauty of lisp until the cows come home, but Elixir has Phoenix and Phoenix has channels, and channels are shiny and modern and won me over xD</p>
<p>Second, compiling to Elixir means we can use elixir’s tooling: Mix as a build tool (with a custom compiler), ExDoc for documentation and the new BEAM chunks for documentation and better error reporting in pattern matches.</p>
<p>I’m not familiar with the Erlang equivalents (rebar and erldoc), but again, Mix makes it easy to integrate with Elixir libraries.</p>
<p><a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a> has been working on a toy implementation, which nonetheless has read macro support.</p>
<p>This project on Github also implements a lisp interpreter on Elixir with static types and HM type inference: <a href="https://github.com/tpoulsen/terp" class="inline-onebox" rel="noopener nofollow ugc">GitHub - smpoulsen/terp: A functional programming language with lisp syntax and ML semantics that runs on the BEAM · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="56918" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-56918" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="56918"
                     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="56947" data-post-id="56947">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Trailing comas would only be allowed with parenthesis.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="56947" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-56947" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="56947"
                     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="56974" data-post-id="56974">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Erlang-Core-Team" data-username="rvirding" data-post="10" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rvirding/48/1409_2.png" class="avatar"> rvirding:</div>
<blockquote>
<p>Yes, go lisp syntax instead. The simplest syntax of them all. Of course it is a little anti-elixir in that it enforces parentheses while elixir allows you to not use them. <img src="https://forum.elixirforum.com/images/emoji/apple/wink.png?v=15" title=":wink:" class="emoji" alt=":wink:" loading="lazy" width="20" height="20"></p>
</blockquote>
</aside>
<p>Hear hear!  Full ML style would be really nice actually.  ^.^</p>
<aside class="quote no-group" data-username="tmbb" data-post="12" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>I’d like a lisp that would compile into Elixir modules. It’s not very hard to do, only a little boring because of little details such as designing a sensible standard library, tooling, sourcemaps, etc. You would know, of course xD</p>
</blockquote>
</aside>
<p>I’d already have that done if I had time, maybe during thanksgiving or christmas breaks…</p>
<aside class="quote no-group quote-modified" data-username="tmbb" data-post="12" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>First, being able to interoperate with Elixir macros is huge, and Elixir’s AST oddities (like do blocks and the internal <strong>block</strong> node) map relatively well to lisp’s progn or the scheme equivalents. With one or two helper macros, one could use Phoenix as is. This interoperability alone makes ir worth it to compile to Elixir instead of Erlang. Phoenix’s “guts” very well designed (PubSub, Channels, Presence), although one might dislike some surface characteristics. And Phoenix is so easy to customize that it doesn’t matter anyway.</p>
</blockquote>
</aside>
<p>Eh, it’d be easy enough for a lisp’y erlang to access elixir macro’s and transform them to it’s internal syntax, though that would be more work over just going to elixir to begin with.  ^.^;</p>
<aside class="quote no-group" data-username="tmbb" data-post="12" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>Phoenix was basically the only reason I went for Elixir instead of LFE. One can debate the timeless beauty of lisp until the cows come home, but Elixir has Phoenix and Phoenix has channels, and channels are shiny and modern and won me over xD</p>
</blockquote>
</aside>
<p>Ditto to be honest.  If not for Phoenix and Hex I’d be using erlang and lfe (probably together) as I prefer both of their syntax’s (and lfe’s substantial features, though it still needs read-macro’s!  ^.^) better.</p>
<aside class="quote no-group" data-username="tmbb" data-post="12" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p><a class="mention" href="/u/overminddl1" rel="nofollow">@OvermindDL1</a> has been working on a toy implementation, which nonetheless has read macro support.</p>
</blockquote>
</aside>
<p>Yeah read-macro support (even scoped!) is nicely trivial to do.  ^.^</p>
<p>I’ve actually been played with an idea to do a Staged compilation pipeline of LISP, this is how macro systems work in most languages (not lisp’s) and although it is ‘slightly’ more limiting, it allows me to output (even typed) ‘final generated code’ much more easily.</p>
<aside class="quote no-group quote-modified" data-username="tmbb" data-post="12" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/t/77aa72/48.png" class="avatar"> tmbb:</div>
<blockquote>
<p>This project on Github also implements a lisp interpreter on Elixir with static types and HM type inference: <a href="https://github.com/tpoulsen/terp" class="inline-onebox" rel="noopener nofollow ugc">GitHub - smpoulsen/terp: A functional programming language with lisp syntax and ML semantics that runs on the BEAM · GitHub</a></p>
</blockquote>
</aside>
<p>This thing looks really cool, I need to play with it, it looks similar to what I was already creating.  ^.^;</p>
<aside class="quote no-group" data-username="net" data-post="13" data-topic="9856" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>Trailing comas would only be allowed with parenthesis.</p>
</blockquote>
</aside>
<p>Yup.  I’d like it in Elixir especially as I tend to do multi-line function calls in many cases (because macro’s, so I cannot just split them out into different bindings).</p>
<p>(Side comment, OCaml has got an Elixir-like Macro system via a PPX just recently ^.^)</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="56974" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-56974" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="56974"
                     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="57103" data-post-id="57103">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I found this thread because I was independently wishing for trailing comma support for arguments.</p>
<p>I have an Ecto query like this:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">    from recipe in query,
      join: id_and_rank in matching_recipe_ids_and_ranks(ts_query_string),
      on: id_and_rank.id == recipe.id,
      order_by: [desc: id_and_rank.rank]
</code></pre>
<p>If I want to see what the results look like without the <code>order_by:</code>, I can’t just comment out that line; I have to also remove the trailing comma on the previous line.</p>
<p>Similarly, I can’t just add a second <code>order_by:</code> without adding a comma to the existing line.</p>
<p>I also would like for Elixir to be consistent in how it treats list vs non-list arguments with regard to trailing commas.</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule ArgsDemo do
  def list_args(args \\ []), do: IO.inspect args
  def normal_args(arg1, arg2), do: IO.inspect [arg1, arg2]
  end
end

# works fine, because lists can have trailing args
ArgsDemo.list_args(
  [
    {:size, 10},
    {:color, "blue"},
  ]
)

# works fine, because it's syntax sugar for a list
ArgsDemo.list_args(
  size: 10,
  color: "blue",
)

# syntax error
ArgsDemo.normal_args(
  10,
  "blue",
)
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57103" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-57103" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57103"
                     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="57105" data-post-id="57105">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ericmj" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ericmj/120/25920_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ericmj
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Elixir Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="nathanl" data-post="15" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/nathanl/48/39891_2.png" class="avatar"> nathanl:</div>
<blockquote>
<p>I found this thread because I was independently wishing for trailing comma support for arguments.</p>
<p>I have an Ecto query like this:</p>
<pre><code>from recipe in query,
  join: id_and_rank in matching_recipe_ids_and_ranks(ts_query_string),
  on: id_and_rank.id == recipe.id,
  order_by: [desc: id_and_rank.rank]
</code></pre>
<p>If I want to see what the results look like without the order_by:, I can’t just comment out that line; I have to also remove the trailing comma on the previous line.</p>
<p>Similarly, I can’t just add a second order_by: without adding a comma to the existing line.</p>
</blockquote>
</aside>
<p>This is exactly why we can’t have trailing commas. You are doing a function call without parenthesis so with trailing commas it’s ambiguous what the last argument is.</p>
<p>In the code below, why would the parser not think <code>other_expression()</code> is the last argument of the <code>from</code> function call?</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">from recipe in query,
  join: id_and_rank in matching_recipe_ids_and_ranks(ts_query_string),
  on: id_and_rank.id == recipe.id,
  order_by: [desc: id_and_rank.rank],
other_expression()
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57105" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-57105" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57105"
                     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="57106" data-post-id="57106">
  <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>Even though we were at a point where trailing commas were supported by the grammar, they will be removed by the formatter… At least this is for map and list literals. I see no reason why the formatter should behave differently on function arguments.</p>
<p>But since I’m forced to use them in <code>go</code>, I really got used to them (and that they do nmot create much noice on diffs)[1].</p>
<p>[1] <code>go fmt</code> has the bad habbit to align values in multiline struct literals, which creates a lot of diff-noise though…</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57106" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-57106" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57106"
                     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="57114" data-post-id="57114">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote group-Elixir-Core-Team" data-username="ericmj" data-post="16" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ericmj/48/25920_2.png" class="avatar"> ericmj:</div>
<blockquote>
<p>This is exactly why we can’t have trailing commas.</p>
</blockquote>
</aside>
<p>Do you mean “this is why we can’t have trailing commas in <em>parenthesis-less</em> calls”? I see no argument in your reply for disallowing them in parenthesis calls.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57114" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-57114" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57114"
                     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="57115" data-post-id="57115">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ericmj" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ericmj/120/25920_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ericmj
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Elixir Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="net" data-post="18" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>Do you mean “this is why we can’t have trailing commas in parenthesis-less calls”? I see no argument in your reply for disallowing them in parenthesis calls.</p>
</blockquote>
</aside>
<p>Yes, the example used a non-parenthesis call so that’s what I commented on. We shouldn’t allow them with parenthesis either because that would be inconsistent and prone to mistakes because the assumption is that the same syntax is allowed for all calls regardless of parenthesis.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57115" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-57115" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57115"
                     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="57129" data-post-id="57129">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>In my mind allowing trailing parenthesis would be <em>more</em> consistent as</p>
<ol>
<li>
<p>trailing parenthesis are allowed in lists, tuples, and maps (in fact this inconsistency is why I would like trailing commas in function calls in the first place)</p>
</li>
<li>
<p>trailing commas are allowed in bracketless keyword lists at the end of function calls:</p>
</li>
</ol>
<pre><code>foo(
  bar,
  baz: 1,
)
</code></pre>
<p>Furthermore, it is not clear to me why trailing commas must be explicitly disallowed in parenthesis-less function calls. Sure, they would never be useable because they would almost always be interpreted as they are now, but if that inconsistency—which already exists in other parts of the language—bothers you, striking parenthesis-y trailing commas is not the only solution. (Parenthesis are commonly used to resolve abiguity anyways, this should be nothing new.)</p>
<p>Lastly, when you say</p>
<aside class="quote group-Elixir-Core-Team" data-username="ericmj" data-post="19" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ericmj/48/25920_2.png" class="avatar"> ericmj:</div>
<blockquote>
<p>and prone to mistakes because the assumption is that the same syntax is allowed for all calls regardless of parenthesis.</p>
</blockquote>
</aside>
<p>are you speaking from experience? I ask because that being an issue is not at all obvious to me. As mentioned above, the assumption that the same syntax is allowed for all calls regardless of parenthasis does not hold: trailing commas are allowed at the end of bracketless keyword lists inside parenthasis calls, but not inside parenthasis-less.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57129" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-57129" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57129"
                     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="57145" data-post-id="57145">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="ericmj" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ericmj/120/25920_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  ericmj
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Elixir Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="net" data-post="20" data-topic="9856">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/net/48/429_2.png" class="avatar"> net:</div>
<blockquote>
<p>Furthermore, it is not clear to me why trailing commas must be explicitly disallowed in parenthesis-less function calls. Sure, they would never be useable because they would almost always be interpreted as they are now, but if that inconsistency—which already exists in other parts of the language—bothers you, striking parenthesis-y trailing commas is not the only solution. (Parenthesis are commonly used to resolve abiguity anyways, this should be nothing new.)</p>
</blockquote>
</aside>
<p>Trailing commas without parenthesis will always be interpreted in the wrong way because we have no way of knowing what the last comma is. It is impossible to implement. We should also strive to reduce the amount of ambiguity in the language, introducing more feels like going in the wrong direction.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="57145" 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/come-on-elixir-if-php-can-do-it-anybody-can-trailing-comma-now-allowed-in-function-method-calls/9856/21">Post #20</a>
	                </div>
	            </div>
              <div id="likers-container-57145" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="57145"
                     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>
</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/9856/load_more?page=3">Load more posts (30 remaining)</a>
</div></template></turbo-stream>