<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yiv1101498225"><div id="yui_3_16_0_ym19_1_1467125950668_31680"><div id="yui_3_16_0_ym19_1_1467125950668_31679" style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div id="yui_3_16_0_ym19_1_1467125950668_31678">Hi all:</div><div id="yui_3_16_0_ym19_1_1467125950668_31685" dir="ltr"><div id="yui_3_16_0_ym19_1_1467125950668_31733" dir="ltr">it depends, Cardelli has stated in an interview the type system was the top part thing of language designers at its time. I recall SPwM3 states also that they video recorded all design sessions, though provably these would not be very attracting to the new modula-3 programmer or computer scientists (instead of it, discouraging). <br></div><div id="yui_3_16_0_ym19_1_1467125950668_31932" dir="ltr">Probably the safety and simplicity were user/programmer priorities</div><div id="yui_3_16_0_ym19_1_1467125950668_32001" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1467125950668_32000" dir="ltr">Thanks in advance<br></div></div><div><span></span></div> <div id="yui_3_16_0_ym19_1_1467125950668_31686" class="yiv1101498225qtdSeparateBR"><br clear="none"><br clear="none"></div></div></div></div><div class=".yiv1101498225yahoo_quoted"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"><font face="Arial" size="2"> El Martes 28 de junio de 2016 17:39, Darko Volaric <lists@darko.org> escribió:<br clear="none"></font></div> <br clear="none"><br clear="none"> <div class="yiv1101498225y_msg_container"><div class="qtdSeparateBR"><br><br></div><div class="yiv1101498225yqt9978857439" id="yiv1101498225yqt86727"><div id="yiv1101498225"><div><div dir="ltr"><br clear="none"><div class="yiv1101498225gmail_extra"><br clear="none"><div class="yiv1101498225gmail_quote">On Tue, Jun 28, 2016 at 11:34 PM, Jay K <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:jay.krell@cornell.edu" target="_blank" href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>></span> wrote:<br clear="none"><blockquote class="yiv1101498225gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr"><div> I find myself on the other side of this. </div><div> There are many people on both sides. </div><div><br clear="none"></div><div> There are countless examples. </div><div><br clear="none"></div><div><br clear="none"></div><div> Here are two. </div><div><br clear="none"></div><div><br clear="none"></div><div> People don't like operator loading. </div><div><br clear="none"></div><div> They don't want me to write </div><div><br clear="none"></div><div> string operator+(string, string); </div><div><br clear="none"></div><div><br clear="none"></div><div> but nobody seems to mind: </div><div> </div><div> </div><div> float f = 1.0 + 2.0; </div><div> int i = 1 + 2;</div><div><br clear="none"></div><div> why is + ok on floats and ints, overloaded, but not user defined types such as string?</div><div> </div><div> </div></div></div></blockquote><div><br clear="none"></div><div><br clear="none"></div><div>The notion that limited fixed operator overloading justifies unlimited user operator overloading is an asinine argument. The former you can easily keep in your head, since the rules are simple and clear. You know given a + b + c + 1.0 that a, b and c are floating point values, or if you didn't have the literal you'd know by knowing the type of one value.</div><div><br clear="none"></div><div>But given user overloading, what is the type of a + b + c + 1.0 or some other expression? You have to know what the type of each value is, you need to know the definitions of the overloads for each type pair, you have to work out what the precedence and associativity rules are so you're evaluating the expression correctly and you have to know the type that each overloaded operator returns and work out what the new type pairs are at each stage of evaluation of the expression.</div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div> </div><blockquote class="yiv1101498225gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr"><div> People don' t like type inferencing. </div><div> </div><div> auto a = 1.0 + 2.0; </div><div> auto b = 1 + 2; </div><div> </div><div> Modula-3 has this more than C and C++98 already, so maybe people here don't mind. </div><div> </div><div> VAR a := 1.0 + 2.0; </div><div> VAR b := 1 + 2; </div><div><br clear="none"></div><div> In either case, nobody seems to mind temporaries without explicit types in function calls or more generally subexpressions. </div><div><br clear="none"></div><div> F(1 + 2); </div><div> F2(1.0 + 2.0); </div><div><br clear="none"></div></div></div></blockquote><div><br clear="none"></div><div><br clear="none"></div><div>Again, this is "type inference" in the most simplistic case and hardly justifies unbounded type inferencing. The static type pf every expression (and subexpression) is known in M3, merely using it introduces no complexity. The static type is easily determined because the rules for determining the type of any expression are small, fixed, simple and strict.</div><div><br clear="none"></div><div><br clear="none"></div><div>If you really want to understand type inferencing and overloading, have a look at the Swift programming language. You'll find yourself writing an innocuous expression and the compiler will tell you that the expression is "ambiguous" or "too complex" even though there doesn't seem any other way to interpret the expression or it involves only one operator/type combo used more than once. What the compiler is really telling you is that it can't infer the type of some subexpression or choose the right method and you must now start applying casts to make it obvious (this doesn't always work and sometimes you have to rewrite it wholesale). Why does this happen? Because Swift allows you to overload functions and operators based on parameter type and return type.</div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div>You say "people are on both sides of this" but good design isn't a democracy or a popularity contest. If you walk around downtown San Francisco you can find many people who will agree with you. You will also find as many people who claim that the government is beaming thoughts into their heads via satellite. How people feel about language features and the fact that they are untroubled by C++ and its misfeatures is not a logical, convincing argument. </div><div><br clear="none"></div><div>The stated design goals for M3 is simplicity and safety, not feature richness or novelty. That should be what guides any discussion of M3 language design.</div><div class="yiv1101498225yqt8598624963" id="yiv1101498225yqtfd07637"><div><br clear="none"></div><div><br clear="none"></div><div> </div><blockquote class="yiv1101498225gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div dir="ltr"><div></div><div><br clear="none"></div><div> - Jay</div><div><br clear="none"></div><div><br clear="none"></div><div>> Date: Tue, 28 Jun 2016 22:15:25 +0200<br clear="none">> From: <a rel="nofollow" shape="rect" ymailto="mailto:wagner@elegosoft.com" target="_blank" href="mailto:wagner@elegosoft.com">wagner@elegosoft.com</a><br clear="none">> To: <a rel="nofollow" shape="rect" ymailto="mailto:rodney.m.bates@acm.org" target="_blank" href="mailto:rodney.m.bates@acm.org">rodney.m.bates@acm.org</a><br clear="none">> CC: <a rel="nofollow" shape="rect" ymailto="mailto:rodney_bates@lcwb.coop" target="_blank" href="mailto:rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>; <a rel="nofollow" shape="rect" ymailto="mailto:jay.krell@cornell.edu" target="_blank" href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>; <a rel="nofollow" shape="rect" ymailto="mailto:m3devel@elegosoft.com" target="_blank" href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><span class="yiv1101498225"><br clear="none">> Subject: Re: [M3devel] cm3 llvm backend?<br clear="none">> <br clear="none"></span><div><div class="yiv1101498225h5">> On Tue, 28 Jun 2016 11:40:06 -0500<br clear="none">> "Rodney M. Bates" <<a rel="nofollow" shape="rect" ymailto="mailto:rodney_bates@lcwb.coop" target="_blank" href="mailto:rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>> wrote:<br clear="none">> <br clear="none">> > On 06/27/2016 08:03 PM, Jay K wrote:<br clear="none">> > > > A teacher of mine called this behavior "version junkie".<br clear="none">> > ><br clear="none">> > ><br clear="none">> > > There are at least two big reasons for this.<br clear="none">> > ><br clear="none">> > > - The language really is improving. Programs<br clear="none">> > > written in the newer language are easier to read<br clear="none">> > > and often easier to optimize and sometimes easier<br clear="none">> > > to implement a compiler for.<br clear="none">> > <br clear="none">> > Sometimes so, sometimes not. Sadly, many language "features" reflect<br clear="none">> > an implicit but very misguided belief that fewer keystrokes/characters<br clear="none">> > means increased readability. Or at least that writability is more<br clear="none">> > important than readability. So often, this means actual code is less<br clear="none">> > explicit. But this makes maintenance far worse.<br clear="none">> > <br clear="none">> > E.g., Ada decided use parentheses for both actual parameter lists to<br clear="none">> > function calls and subscript lists to arrays. Along with optional<br clear="none">> > implicit operations like dereferencing, there are somewhere in the<br clear="none">> > teens of possible meanings for the innocent looking "f(x)". I have forgotten<br clear="none">> > the exact number, but once had to do the semantic analysis. That was<br clear="none">> > Ada 83. Maybe more have been added since. For the poor schmuck who<br clear="none">> > gets called at 3:00 AM to fix a bug in half a million lines of code<br clear="none">> > she didn't write, this is a readability disaster. The savings of<br clear="none">> > keystrokes in not making the operations explicit is penny-wise and<br clear="none">> > million-pound foolish.<br clear="none">> <br clear="none">> I couldn't agree more with this. My focus seems to have moved away from<br clear="none">> programming to reading and analyzing code, too. Often it is almost next<br clear="none">> to impossible for me to find the exact meaning or definition of an<br clear="none">> expression or call without knowing all the other code which is not<br clear="none">> obviously related to the location in question.<br clear="none">> <br clear="none">> I would favour longer explicit syntax and clear meaning above<br clear="none">> shorter expressions any time.<br clear="none">> <br clear="none">> Olaf<br clear="none">> -- <br clear="none">> Olaf Wagner -- elego Software Solutions GmbH -- <a rel="nofollow" shape="rect" target="_blank" href="http://www.elegosoft.com/">http://www.elegosoft.com</a> <br clear="none">> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany<br clear="none">> phone: <a href="" rel="nofollow" shape="rect">+49 30 23 45 86 96</a> mobile: <a href="" rel="nofollow" shape="rect">+49 177 2345 869</a> fax: <a href="" rel="nofollow" shape="rect">+49 30 23 45 86 95</a><br clear="none">> Geschäftsführer: Olaf Wagner | Sitz: Berlin<br clear="none">> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194<br clear="none"></div></div></div> </div></div>
<br clear="none">_______________________________________________<br clear="none">
M3devel mailing list<br clear="none">
<a rel="nofollow" shape="rect" ymailto="mailto:M3devel@elegosoft.com" target="_blank" href="mailto:M3devel@elegosoft.com">M3devel@elegosoft.com</a><br clear="none">
<a rel="nofollow" shape="rect" target="_blank" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br clear="none">
<br clear="none"></blockquote></div></div><div class="yiv1101498225yqt8598624963" id="yiv1101498225yqtfd70330"><br clear="none"></div></div></div></div></div></div><br clear="none"><div class="yiv1101498225yqt8598624963" id="yiv1101498225yqtfd41261">_______________________________________________<br clear="none">M3devel mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:M3devel@elegosoft.com" target="_blank" href="mailto:M3devel@elegosoft.com">M3devel@elegosoft.com</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="https://m3lists.elegosoft.com/mailman/listinfo/m3devel">https://m3lists.elegosoft.com/mailman/listinfo/m3devel</a><br clear="none"></div><br clear="none"><br clear="none"></div> </div> </div> </div></div></body></html>