[M3devel] cm3 llvm backend?
jay.krell at cornell.edu
Tue Jun 28 23:34:35 CEST 2016
I find myself on the other side of this. There are many people on both sides.
There are countless examples.
Here are two.
People don't like operator loading.
They don't want me to write
string operator+(string, string);
but nobody seems to mind: float f = 1.0 + 2.0; int i = 1 + 2;
why is + ok on floats and ints, overloaded, but not user defined types such as string? People don' t like type inferencing. auto a = 1.0 + 2.0; auto b = 1 + 2; Modula-3 has this more than C and C++98 already, so maybe people here don't mind. VAR a := 1.0 + 2.0; VAR b := 1 + 2;
In either case, nobody seems to mind temporaries without explicit types in function calls or more generally subexpressions.
F(1 + 2); F2(1.0 + 2.0);
> Date: Tue, 28 Jun 2016 22:15:25 +0200
> From: wagner at elegosoft.com
> To: rodney.m.bates at acm.org
> CC: rodney_bates at lcwb.coop; jay.krell at cornell.edu; m3devel at elegosoft.com
> Subject: Re: [M3devel] cm3 llvm backend?
> On Tue, 28 Jun 2016 11:40:06 -0500
> "Rodney M. Bates" <rodney_bates at lcwb.coop> wrote:
> > On 06/27/2016 08:03 PM, Jay K wrote:
> > > > A teacher of mine called this behavior "version junkie".
> > >
> > >
> > > There are at least two big reasons for this.
> > >
> > > - The language really is improving. Programs
> > > written in the newer language are easier to read
> > > and often easier to optimize and sometimes easier
> > > to implement a compiler for.
> > Sometimes so, sometimes not. Sadly, many language "features" reflect
> > an implicit but very misguided belief that fewer keystrokes/characters
> > means increased readability. Or at least that writability is more
> > important than readability. So often, this means actual code is less
> > explicit. But this makes maintenance far worse.
> > E.g., Ada decided use parentheses for both actual parameter lists to
> > function calls and subscript lists to arrays. Along with optional
> > implicit operations like dereferencing, there are somewhere in the
> > teens of possible meanings for the innocent looking "f(x)". I have forgotten
> > the exact number, but once had to do the semantic analysis. That was
> > Ada 83. Maybe more have been added since. For the poor schmuck who
> > gets called at 3:00 AM to fix a bug in half a million lines of code
> > she didn't write, this is a readability disaster. The savings of
> > keystrokes in not making the operations explicit is penny-wise and
> > million-pound foolish.
> I couldn't agree more with this. My focus seems to have moved away from
> programming to reading and analyzing code, too. Often it is almost next
> to impossible for me to find the exact meaning or definition of an
> expression or call without knowing all the other code which is not
> obviously related to the location in question.
> I would favour longer explicit syntax and clear meaning above
> shorter expressions any time.
> Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com
> Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
> phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
> Geschäftsführer: Olaf Wagner | Sitz: Berlin
> Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel