<html><head></head><body><div style="color:#000; background-color:#fff; font-family:Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:13px"><div id="yui_3_16_0_ym19_1_1505517459498_1673291" dir="ltr"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673316">> I agree - there are many fun languages on the horizon.</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673317">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673318"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673319">> Red, Nim, Crystal, Eve, Pony<br></span><span id="yui_3_16_0_ym19_1_1505517459498_1673342"><br>This always leads me to think we should be writing engines, not languages. A language should just be a syntax that compiles into an <br>abstract form. Too many of these new languages keep repeating the same things over and over in slightly different ways when it comes<br>to the internals.<br><br><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673482">> When I'm writing Elixir I keep thinking - "I wish I could do that in Erlang"</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673483"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673484">> Pipes are nice - we talked about them.</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673485">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673486"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673487">> I also like string interpolation</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673488">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673489"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673490">> io:format("Hello ~s it's ~s today",[Person,Weather])</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673491">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673492"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673493">> Sucks - the Variables are too far away from the formatting characters</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673494"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673495">> so</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673496">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673497"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673498">> io:format("Hello #{Person} it's #{Raining} today")</span><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673499">><br clear="none" style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673500"><span style="font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif;" id="yui_3_16_0_ym19_1_1505517459498_1673501">> would be much nicer<br></span><br>I really like the ideas behind this but working with the yrl seems to be an undocumented dark art, and very time consuming to <br>learn. There is so many things I would like to be able to do and to have the code compile to the same/functionally similar abstract form.<br><br>my_fun(atom, Map=#{bitfield_set=> _}) -><br> Value = maps:get(key, Map),<br> Value2 = maps:get(key2, Map, undefined),<br> Value3 = maps:get(key4, maps:get(key3, Map, #{}), undefined),<br> List = io:format("the atom as a binary is ~p ~p", [atom, Value]),<br> unicode:characters_to_binary(List).<br><br> VS<br><br>fun my_fun(atom, Map=#{bitfield_set}) -><br> Value = Map[key]<br> Value2 = Map[key2, undefined]<br> Value3 = Map[key3][key4]<br> "the atom as a binary is #{atom} #{Value}"<br>end</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Thursday, September 28, 2017 2:21 PM, Joe Armstrong <erlang@gmail.com> wrote:<br></font></div> <br><br> <div class="y_msg_container"><div dir="ltr">On Thu, Sep 28, 2017 at 5:59 PM, zxq9 <<a shape="rect" ymailto="mailto:zxq9@zxq9.com" href="mailto:zxq9@zxq9.com">zxq9@zxq9.com</a>> wrote:<br clear="none">> On 2017年09月28日 木曜日 11:33:29 Fred Hebert wrote:<br clear="none">>> I am able to get along fine without it, but if working without a similar<br clear="none">>> construct requires 40 posts in a mailing list to make sure other people<br clear="none">>> get a solution or pattern they are comfortable with when the operator is<br clear="none">>> *not* available, then maybe there's a need to look at ways to improve<br clear="none">>> the current state of things.<br clear="none">><br clear="none">> I get your point, but this is a fantastic mischaracterization of what is<br clear="none">> happening.<br clear="none">><br clear="none">> So what IS actually happening?<br clear="none">><br clear="none">> We have an explosion of fad languages that keep adding sexy syntax all<br clear="none">> over the place. People get sort of used to a few of them and then get<br clear="none">> surprised when something new (like matching) is central to this new one<br clear="none">> they're not used to, but feel like things are somehow wrong if one they<br clear="none">> were expecting (like a composition operator, or objects, or whatever) is<br clear="none">> missing.<br clear="none">><br clear="none">> What is happening in that fantabulous language space?<br clear="none">><br clear="none">> The languages are dying out, suffocating under their own weight and<br clear="none">> semantic confusion -- leading to the sudden emergence of new sexy<br clear="none">> languages.<br clear="none">><br clear="none">> This is actually AWESOME, overall, for the future of programming.<br clear="none">> Eventually we are definitely going to figure out on something that is<br clear="none">> just flat out Right for a wide variety of general cases.<br clear="none">><br clear="none">> But it is actually REALLY BAD for maintenance, writing production code,<br clear="none">> onboarding new people who need to be productive, and the stability of<br clear="none">> languages overall. Languages don't really evolve -- they become new,<br clear="none">> subtly incompatible languages.<br clear="none">><br clear="none">> Erlang's focus is production, not research. It cannot afford to be a<br clear="none">> fad language. So yes, arguing AGAINST changing it should be a stringent,<br clear="none">> even a knee-jerk reaction to any new suggestions. Erlang works quite well<br clear="none">> in a shocking variety of domains. Anything new threatens that. New<br clear="none">> suggestions absolutely should have to stand up to withering criticism<br clear="none">> over and over until their underlying merit finally wins out.<br clear="none"><br clear="none">I agree - years ago I argued against backwards compatibility - but<br clear="none">that was in the<br clear="none">days when if you wanted to change the language and break old code<br clear="none">we only had a few users and they were used to us breaking things.<br clear="none"><br clear="none">The first doubts I had came a few years later - we were growing and<br clear="none">I wanted to break the system again by removing stuff that we should<br clear="none">never have put it.<br clear="none"><br clear="none">I had an argument with a guy - over this.<br clear="none"><br clear="none">"But we've tested the code"<br clear="none"><br clear="none">"So change it and test again"<br clear="none"><br clear="none">"Do you realise how difficult a test is?"<br clear="none"><br clear="none">"No"<br clear="none"><br clear="none">"We have to book the test facility 3-4 months in advance, they have to setup<br clear="none">it up - this takes 3-4 days (if we're lucky) then we run the tests a few hours<br clear="none">and they tear down the test setup - there's a lot of hardware involved."<br clear="none"><br clear="none">The test facility had to booked months in advance and the tests cost a lot.<br clear="none">Full systems test are far more expensive that software testing .. .<br clear="none"><br clear="none">Fast forward 30 years.<br clear="none"><br clear="none">Amazing I can still compile and run erlang code I wrote 30 years ago - mostly<br clear="none">it works sometimes it needs very small changes.<br clear="none"><br clear="none">When I run my old C (which worked) I am hit by a tsnami of warnings and errors.<br clear="none"><br clear="none">There's a problem with software - really when we add something to a language.<br clear="none">We could have removed records when we added maps but this cause howls<br clear="none">of protest.<br clear="none"><br clear="none">I think if you want to make a new dialect of Erlang (and it is a new<br clear="none">dialect and not a new language) then find - go ahead.<br clear="none"><br clear="none">I while back I made erl2 to experiment with some changes to Erlang.<br clear="none">(see <a shape="rect" href="https://github.com/joearms/erl2" target="_blank">https://github.com/joearms/erl2</a>)<br clear="none"><br clear="none">X.erl2 files are transpiled into X.erl files -- this messes with and breaks<br clear="none">nothing.<br clear="none"><br clear="none">If anybody wants to fix a bug they have to delve into erl2 and there is<br clear="none">no tooling emacs mode screws up, dialyzer etc cannot work on erl2<br clear="none">and so on.<br clear="none"><br clear="none">Elixir is sufficiently different from Erlang that it superficially looks like<br clear="none">a different language - the funny thing (to me) is that this relative small<br clear="none">change in syntax turns out to turn what is perceived as "scary"<br clear="none">into something that is perceived as "familiar".<br clear="none"><br clear="none">When I'm writing Elixir I keep thinking - "I wish I could do that in Erlang"<br clear="none">Pipes are nice - we talked about them.<br clear="none"><br clear="none">I also like string interpolation<br clear="none"><br clear="none"> io:format("Hello ~s it's ~s today",[Person,Weather])<br clear="none"><br clear="none"> Sucks - the Variables are too far away from the formatting characters<br clear="none">so<br clear="none"><br clear="none"> io:format("Hello #{Person} it's #{Raining} today")<br clear="none"><br clear="none">would be much nicer<br clear="none"><br clear="none"><br clear="none">><br clear="none">> Python is in the same boat. "40 posts in a mailing list"... have you<br clear="none">> seen the extreme reluctance Guido takes to adding new features? There is<br clear="none">> a reason. And Python is better for it, still remains consistent, and<br clear="none">> has weathered the language storms to the point that it is emerging as<br clear="none">> the new Java.<br clear="none">><br clear="none">> That didn't happen by adding stuff because it was hip at the moment,<br clear="none">> considered cool in some other language, or whatever. He was serious about<br clear="none">> the idea that "there should be one, preferrably obvious, way to do it".<br clear="none">> Over time it really looks like this has been the more powerful philosophy.<br clear="none">><br clear="none">> This thread wasn't even about adding a new feature or keeping one out.<br clear="none">> It was about a coding convention Joe ran by us all that sparked a<br clear="none">> conversation which attracted the predictable Elixir straphanger who needed<br clear="none">> to mention that Elixir has pipe syntax and `with` that can do stuff. Neato.<br clear="none">> That's great for Elixir, but a bad fit for Erlang if the only reason is<br clear="none">> to add a "me, too" feature.<br clear="none">><br clear="none">> I'm not against language advancement, but I am against flippant language<br clear="none">> changes. I will play Devil's Advocate for a year, even against features<br clear="none">> I think would personally benefit ME, simply because language changes VERY<br clear="none">> OFTEN have unintended consequences later that are just super hard to<br clear="none">> square after the fact (well, impossible, really). Language design and<br clear="none">> syntax are super tricky subjects once you get outside pure lambda calculus.<br clear="none">> Let's let the exploration bonanza continue -- elsewhere.<br clear="none"><br clear="none">I agree - there are many fun languages on the horizon.<br clear="none"><br clear="none">Red, Nim, Crystal, Eve, Pony<br clear="none"><br clear="none">><br clear="none">> When it is time to introduce some of these slick features it will be time<br clear="none">> for an Erlang 2 (well, called something else hopefully). I do not believe<br clear="none">> that language is Elixir, though. It has shown us a lot, but its beginning<br clear="none">> to remind me of why Ruby eventually fell apart.<br clear="none"><br clear="none">I'm not so sure - PHP is very popular - Visual Basic was so good<br clear="none">that Microsoft had to ruin it - Hypercard was so good that it is no longer<br clear="none">available. Programming in Borland turbo graphics was so fast and easy<br clear="none">that massive IDEs had to be invented.<br clear="none"><br clear="none">Simple languages that encourage clear and correct code and do<br clear="none">no need armies of consultants to maintain into the future<br clear="none">are not very popular.<br clear="none"><br clear="none">It's the "Nobody got sacked for using Microsoft" phenomena - there is<br clear="none">job security in using mainstream languages, and job security in writing and<br clear="none">fixing buggy code.<br clear="none"><br clear="none">/Joe<br clear="none"><br clear="none"><br clear="none">><br clear="none">> -Craig<br clear="none">> _______________________________________________<br clear="none">> erlang-questions mailing list<br clear="none">> <a shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none">> <a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><div class="yqt1962162630" id="yqtfd89938"><br clear="none">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div></div><br><br></div> </div> </div> </div></div></body></html>