<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 24, 2017 at 9:40 AM, Loïc Hoguin <span dir="ltr"><<a href="mailto:essen@ninenines.eu">essen@ninenines.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 11/24/2017 03:07 PM, Eric des Courtis wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
From my perspective, we want the following things:<br>
<br></span>
* The libraries to stay simple, small and clean (that means throwing<br>
away things)<br>
* Our old code to continue to work without modifications (that means<span class=""><br>
having a mechanism for compiling old code targetting new versions of<br>
Erlang)<br>
</span></blockquote>
<br>
That can work in many cases but not in the general case. This only works for a specific set of changes where an equivalent still exists in the code base.<br></blockquote><div>That doesn't change the fact that most of the modules and functions we are talking about don't have this problem. Therefore it is probably an acceptable solution even if not perfect.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
For example removing ciphers or hashes in crypto requires human intervention on every code bases that require them.<br></blockquote><div>This is that is true and perhaps that is one of the few examples of where it doesn't make sence to try to preserve good backwards compatibility (assuming the app even knows about specific ciphers).</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Another issue comes from old code requiring syntax or VM features that have been removed.<br></blockquote><div>It doesn't have to be all or nothing. As far as syntax goes we can transpile the code. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Then you have issues where it is technically still possible to do the old functionality, but the performance or memory aspects are not equivalent.<br></blockquote><div>Again in most cases that isn't really an issue. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* To mix old and new Erlang code together<br>
</blockquote>
<br>
If it's maintained, no problem. If not, even if it compiles and runs you should probably make sure to have a good set of tests to know it still works as intended.<br></blockquote><div>Even if libraries are old they usually come with tests so it can work for many cases. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
You'll want to do this even if OTP team go out of their way to make sure everything stays compatible forever.<br></blockquote><div>We are already more or less in that boat already. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
I see no reason why we can't have both. What I am not okay with is:<br>
<br></span>
* Endlessly growing libraries of functions that are there for legacy<span class=""><br>
reasons (wasting space and confusing new developers)<br></span>
* Fixing libraries over and over again because something got marked<span class=""><br>
deprecated<br>
<br>
So how do we get both?</span> </blockquote></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You don't.<br></blockquote><div>Yes but you can get something like 1.9 and reduce user pain substantially.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
In fact your second point is incorrect: there's absolutely no reason to fix a library because something got marked deprecated.<br></blockquote><div>There is because it usually gets removed (so do the work now or later what is the difference?). I don't always fix things until it's too late and things don't work. And too be honest this stuff happens too often in Erlang. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Zero.<br>
<br>
Developers should not "fix" libraries when something gets marked deprecated. Developers should *take notice* that something has been deprecated.<br></blockquote><div> If most deprecations never got removed I would agree however that isn't my experience.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
There's nothing to fix to begin with! Check your OCD levels and stop trying to get rid of all the deprecation warnings with obscure parse transforms or version-specific defines... </blockquote><div>That isn't really a big concern of mine.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The time to fix comes when the feature gets *removed* or is rendered *incompatible*. (Or soon before that actually happens, anyway.)<br></blockquote><div>Yes and I keep finding myself forking all kinds of libraries to fix this crap. Often for no good reason at all. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
As far as the string module is concerned, there's absolutely no need to spend efforts to make your code run for both the old and the new string module because the functions will not be removed for a very long time. And until they are, chances are you will stop supporting OTP versions before the new functions were introduced. You can do the changes THEN.<br></blockquote><div>Again it doesn't matter. You like doing changes last minute I don't. Now that doesn't mean I am going to change 10 libraries in my application to make sure they don't use tokens() or whatever. But when it gets removed I get to waste time chasing functions that have been removed. Instead of just marking it as OTP R16 compatible and moving on. The JVM solved this a long time ago with the "-source" and "-target" option.</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I am baffled every time someone opens a ticket telling me that I have deprecation warnings. I know! But they're harmless and the code works on all supported versions, so why would I spend efforts to remove it?<br></blockquote><div>You wont get that kind of issue from me. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Your question can be reframed to be about an endlessly growing library + having to fix libraries when things get removed, which is more of a choice, you can't really have both. Either you have an endlessly growing library, or you remove functions and fix libraries (manually or otherwise).</blockquote><div>Yes that is what I meant to say (change deprecated to removed) . </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
Loïc Hoguin<br>
<a href="https://ninenines.eu" rel="noreferrer">https://ninenines.eu</a><br>
</div></div></blockquote></div><br></div></div>