<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="111668" data-post-id="111668">
  <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">
								<aside class="quote no-group" data-username="gregvaughn" data-post="120" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>My main point against it is the extra complexity it adds to the language that every developer is going to have to learn and deal with as long as Elixir exists.</p>
</blockquote>
</aside>
<p>This hardly seems more complex than “don’t use modules with <code>@modulesoc false</code>” or “tag with <code>@moduledoc false</code> all modules you don’t want others to use”.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111668" 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/proposal-private-modules-general-discussion/19374/122">Post #121</a>
	                </div>
	            </div>
              <div id="likers-container-111668" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111668"
                     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 #121"></div>
  </section>
</div>
    <div class="postbit" id="111669" data-post-id="111669">
  <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">
								<aside class="quote no-group" data-username="thomasbrus" data-post="121" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/thomasbrus/48/40196_2.png" class="avatar"> thomasbrus:</div>
<blockquote>
<p>Would specifying <code>visible_to</code> be required? I think in almost all cases the value of <code>visible_to:</code> is chosen to be that of the namespace one level above. It almost seems redundant.</p>
</blockquote>
</aside>
<p>I dislike implicit naming conventions in modules (like what Phoenix does to match controllers and views). I’d prefer if this was as explicit as possible.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111669" 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/proposal-private-modules-general-discussion/19374/123">Post #122</a>
	                </div>
	            </div>
              <div id="likers-container-111669" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111669"
                     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 #122"></div>
  </section>
</div>
    <div class="postbit" id="111684" data-post-id="111684">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Shouldn’t say solved. I was just thinking if distillery had explicitly listed version requirement for Elixir.</p>
<p>In thinking it through further, I can see a lot of other problems that would cause though, so never mind. That was a hasty comment.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111684" 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/proposal-private-modules-general-discussion/19374/124">Post #123</a>
	                </div>
	            </div>
              <div id="likers-container-111684" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111684"
                     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 #123"></div>
  </section>
</div>
    <div class="postbit" id="111713" data-post-id="111713">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I would argue that this isn’t a technological solution at all, but exactly what you advocate. It’s a communication tool designed to help with “people problems”.</p>
<p>And as far as learning, most people are accustomed to working in a language that has some form of private/public parts in it. If they then learn how Elixir does it currently, it would seem like nothing short of a really hacky solution.</p>
<p>Again, this proposal isn’t here to stop determined attempts to use private code as it were public. It’s about the clear expression of intent. I just don’t understand how some people see this as a negative. Conventions and warning are at worst hacky, at best easy to miss or ignore.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111713" 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/proposal-private-modules-general-discussion/19374/125">Post #124</a>
	                </div>
	            </div>
              <div id="likers-container-111713" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111713"
                     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 #124"></div>
  </section>
</div>
    <div class="postbit" id="111724" data-post-id="111724">
  <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="gregvaughn" data-post="120" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>Developers depending on undocumented modules is a “people problem.” I’ve rarely seen people problems fixed with technological solutions.</p>
</blockquote>
</aside>
<p>True, but in my experience with people they always ignore any warning signs but even a slight slap on the wrist immediately gets their attention.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111724" 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/proposal-private-modules-general-discussion/19374/126">Post #125</a>
	                </div>
	            </div>
              <div id="likers-container-111724" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111724"
                     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 #125"></div>
  </section>
</div>
    <div class="postbit" id="111730" data-post-id="111730">
  <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="gregvaughn" data-post="120" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>What that buys us is a reduced public perception of package upgrades being brittle.</p>
</blockquote>
</aside>
<p>This isn’t the only problem this proposal solves. As many others have said, even within the same application, maintained by the same team, this proposal helps outline boundaries for future uses of the code. <em>Edit: I have updated the proposal to list this as well.</em></p>
<p>Also, I have had in multiple instances to maintain code that I was really not supposed to, nor didn’t want to, to not break other people’s code that were accidentally using private APIs. It is easy to see how this is not healthy in the long term: it discourages the team to bring more improvements while increasing the maintenance burden.</p>
<p>So saying this only aids with the public perception is not true. Especially because, it is not about even about <em>perception</em>, since those applications are <em>actually broken</em> on updates due to transitive dependencies. This is mentioned directly in the proposal: “Even more worrying, is that this practice in the long term can be really harmful as systems grow in size”.</p>
<aside class="quote no-group" data-username="gregvaughn" data-post="120" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/gregvaughn/48/954_2.png" class="avatar"> gregvaughn:</div>
<blockquote>
<p>Developers depending on undocumented modules is a “people problem.” I’ve rarely seen people problems fixed with technological solutions.</p>
</blockquote>
</aside>
<p>Isn’t improving the language so we can better communicate between teams and users about our boundaries a way to use technology to improve what is inherently a people’s problem? What are the other suggestions then to solve this problem? How can we better reveal intent about the use of “private” modules given the current mechanisms are clearly not enough?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111730" 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/proposal-private-modules-general-discussion/19374/127">Post #126</a>
	                </div>
	            </div>
              <div id="likers-container-111730" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111730"
                     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="111784" data-post-id="111784">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m not sure I accept the original premise/reason for this proposal. I understand the desire to have a demarcation between the exposed API and internal implementation. but I prefer to rely on the structure of the library and it’s documentation rather than forcing something explicit. I like the fact that everything is public. Most libraries are structured with a main module with the exposed API, all other modules are implementation. If I use something in an implementation module I do so with the understanding that my code will break in the next version and I’ll need to fix it.</p>
<p>As to the issue if Elixir is updated and breaks package X, which then breaks package Y and Z, I’m okay with that. Package X will get updated and package Y and Z will get updated. If one of them doesn’t, say Y, then folks will either stay on the previous version of Elixir if they HAVE to use Y, or package A will come along and replace Y. This is just the natural state of Open Source Software.</p>
<p>Having said all that, I’d prefer option D then C if I have to choose one.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111784" 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/proposal-private-modules-general-discussion/19374/128">Post #127</a>
	                </div>
	            </div>
              <div id="likers-container-111784" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111784"
                     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="111785" data-post-id="111785">
  <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="baldmountain" data-post="128" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/baldmountain/48/2561_2.png" class="avatar"> baldmountain:</div>
<blockquote>
<p>I understand the desire to have a demarcation between the exposed API and internal implementation. but I prefer to rely on the structure of the library and it’s documentation rather than forcing something explicit.</p>
</blockquote>
</aside>
<p>There are literally maintainers of the biggest and most used Elixir packages in this thread who tell you that this is not working. I sympathize with the sentiment but practice shows that many people simply rush their way through tasks and do not notice these nuances.</p>
<aside class="quote no-group" data-username="baldmountain" data-post="128" data-topic="19374">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/baldmountain/48/2561_2.png" class="avatar"> baldmountain:</div>
<blockquote>
<p>This is just the natural state of Open Source Software.</p>
</blockquote>
</aside>
<p>Agreed. But that’s not helping corporate teams. We have enough work as it is and we can’t be eternally tracking <strong>The-New-Hotness®</strong>. We have stuff to do. If we cannot keep on top of things by re-reviewing the ecosystem once a month then we’ll eventually move our business elsewhere.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111785" 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/proposal-private-modules-general-discussion/19374/129">Post #128</a>
	                </div>
	            </div>
              <div id="likers-container-111785" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111785"
                     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="111817" data-post-id="111817">
  <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’ve been thinking and maybe my main objection is that any package that used <code>defmodulep</code> will be instantly impossible to use in older Elixir versions. Because <code>defmodulep</code> is a macro, you can’t simple define it in a dummy module somewhere in your app, and just use it. You have to import your dummy module, and that propagates through your source in a distracting way. But that’s the cost of innovation, I guess…</p>
<p>The more I think about this proposal, the more I think there should be both a <code>requirep</code> and an <code>aliasp</code> macro. An <code>aliasp</code> macro would play well with the idea that private modules should start with <code>:"Elixirp."</code> and would avoid the cost of <code>require</code>ing the module (because <code>alias</code> calls can be made in parallel).</p>
<p>Even if we decide to have a stronger level of name mangling, such as starting the private module names with <code>:"Elixirp.&lt;hash_of_the_module_name&gt;."</code>, <code>aliasp</code> would work as long as the hash is deterministic. So no need to require the module anyway.</p>
<p>Another possibility would be to rename <code>aliasp</code> as something like <code>expose</code>. That way it would read quite naturally:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodulep MyLib.Hidden do
  @visible_to: [MyLib.Public]
  # ...
end
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">defmodule MyLib.Public do
  expose MyLib.Hidden
  # or
  expose MyLib.Hidden, as: Hidden
  # instead of
  aliasp MyLib.Hidden
  # ...
end
</code></pre>
<p><code>require</code> could continue to be <code>require</code> instead of <code>requirep</code> in this case.</p>
<p>But ultimately, I guess I prefer the consistency of having everything end with a p: <code>defmodulep</code>, <code>aliasp</code>, <code>requirep</code>, <code>defp</code>, <code>defmacrop</code>, <code>defguardp</code>, no matter how bad it sounds while reading these aloud.</p>
<p>So I’d vote for <code>defmodulep</code>, <code>requirep</code> and <code>aliasp</code>.</p>
<p>I still prefer the mangled module names instead of the ones starting with the fixed <code>Elixirp</code> prefix, but for practical reasons I might settle for Elixirp.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111817" 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/proposal-private-modules-general-discussion/19374/130">Post #129</a>
	                </div>
	            </div>
              <div id="likers-container-111817" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111817"
                     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="111823" data-post-id="111823">
  <section>
    <div class="post-wrap">


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

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>As I said, I fully accept that we will end up with private modules in Elixir. I have no illusions that I will change anyone’s mind. I continue the conversation only for those who wish to understand the contrary opinion.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="19374">
<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>This isn’t the only problem this proposal solves. As many others have said, even within the same application, maintained by the same team, this proposal helps outline boundaries for future uses of the code. <em>Edit: I have updated the proposal to list this as well.</em></p>
</blockquote>
</aside>
<p>Within a team, if some part of the code they own is dependent on some other private part that they also own, then it’s up to them to resolve that before refactoring the private part. If/when a team chooses to try to prevent this situation, then they have choices like pair programming, code reviews, linting tools, etc.</p>
<p>Effects within a team are less important than third party dependencies though. I’ve lived through projects with bloated node_modules, 1000 line Gemfiles, and heavyweight maven dependencies. The more of those you have, the harder it is to upgrade. And, yes, I’ve even debugged into some of those libraries that intentionally work around the language’s privacy features. The more dependencies you have, the greater the chance at least one of them has something like this happening. Private modules will change how frequently it happens, but it does not completely prevent it.</p>
<p>Third party libraries are not “free as in beer” but more like “a free puppy.” Puppies are great! But, you may not be able to make impromptu trips out of town any more because the dog needs to be fed, or you may have to buy new shoes because the puppy chewed them, etc. The point is that third party libraries change your “lifestyle.” Teams should take a more cautious approach to using them than is the norm today. This is the direction toward reduced brittleness in software in my opinion, but I’m still trying to figure out best how to encourage it. Thinking that private modules solves the problem once and for all works against this goal. I’m not suggesting anyone specifically thinks that, just that it would be contrary to my goal.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="19374">
<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 saying this only aids with the public perception is not true. Especially because, it is not about even about <em>perception</em> , since those applications are <em>actually broken</em> on updates due to transitive dependencies.</p>
</blockquote>
</aside>
<p>I didn’t mean to imply perception was the <em>only</em> value, just that it was the primary one in my mind. Elixir is a growing community, and developers have plenty of other choices of language communities to invest their time in instead. We’d like Elixir to reach a critical mass that we can continue (or begin to) enjoy our time working in this wonderful language professionally. If people who are considering investing time with Elixir hear about too much brittleness it might send them elsewhere and limit that critical mass.</p>
<aside class="quote group-livebook_core_team" data-username="josevalim" data-post="127" data-topic="19374">
<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>How can we better reveal intent about the use of “private” modules given the current mechanisms are clearly not enough?</p>
</blockquote>
</aside>
<p>I wish I had a great answer, but I don’t. But my main point is this is not so clear to me. And on top of that, I’m not sure we’re weighing the costs of the feature enough. Aside from what I mentioned earlier about needing to learn and use it, what about operational debugging when calling a private module is a huge help, or how sad will it be to announce the compiler has slowed down x%, or what if OTP introduces a low level feature in the future that would give us an even better way to communicate privacy?</p>
<p>It boils down to how we weigh the “current mechanisms are clearly not enough” with the potential intangible cost of private modules in the long run.</p>
<p>So, I’ve shared my opinion. I don’t have the time or energy for a big debate. I"m not upset about it. I expect to see private modules in Elixir, and I expect I’ll grumble a bit to myself but mostly my life will go on with few changes.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="111823" 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/proposal-private-modules-general-discussion/19374/131">Post #130</a>
	                </div>
	            </div>
              <div id="likers-container-111823" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="111823"
                     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>
</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/19374/load_more?page=14">Load more posts (27 remaining)</a>
</div></template></turbo-stream>