DIP 1016--ref T accepts r-values--Community Review Round 1

Manu turkeyman at gmail.com
Wed Jul 25 08:34:30 UTC 2018


On Wed., 25 Jul. 2018, 12:30 am Paolo Invernizzi via Digitalmars-d, <
digitalmars-d at puremagic.com> wrote:

> On Wednesday, 25 July 2018 at 02:21:18 UTC, Marco Leise wrote:
> > Am Sat, 21 Jul 2018 19:22:05 +0000
> > schrieb 12345swordy <alexanderheistermann at gmail.com>:
> >
> >> On Saturday, 21 July 2018 at 08:55:59 UTC, Paolo Invernizzi
> >> wrote:
> >>
> >> > Frankly speaking, my feeling is that D is becoming a
> >> > horrible mess for the programmer...
> >>
> >> > /Paolo
> >> How!? Please Explain. You need to demonstrate evidence instead
> >> of appeal to emotional fallacy by resorting to "feels".
> >>
> >> -Alexander
> >
> > The DIP increases consistency recalling that rvalues are
> > accepted:
> >
> > - for the implicit 'this' parameter in methods
> > - in foreach loop variables declared as ref
> >
> > No more special rules: rvalues are implicitly promoted to
> > lvalues where needed.
>
> That's correct, but 'this' is already a special guest in C++
> style PL, with its own special rules. The support for ref
> variable in foreach loop.... can be removed (yup!), or made
> stricter.. no more inconsistency.
>

With UFCS as a super popular feature of D, 'this' is not really much of a
special guest at all.
It's just as much the first argument of a function as the first argument of
*any* UFCS call.


> It is kind of ironic that in order to do better than C++ you
> > have to support most of what modern C++ compilers offer and end
> > up having tons of unrelated features that make the language
> > just as bloated as C++ after a decade of community feedback.
> > It is a system PL. I think it needs to be this way and is a
> > lot cleaner with basic data types and more expressive still,
> > lacking a lot of C++'s legacy.
>
> There's a tension between Walter effort in turning D as a
> suitable language for memory correctness, and a good candidate
> for writing 'bug free rock solid software fast' and the
> continuous addition of features like this.
>

This isn't 'a feature' so much as lifting a restriction for the sake of a
bunch of uniformity and simplification.
I can't really see how you can find that disagreeable from your apparent
position...


Joke aside, I'm still on Jonathan side on this.
>
> Finally, sorry to use often the term 'feeling', and sorry for not
> being constructive: but really is a 'feeling'... I don't pretend
> to be right. So no problems in just ignoring that
>

It upsets me when people present strong opinions about this who literally
have no horse in the race. This is only really meaningful, and only affects
you if it actually affects you... It's clearly not important to you, or you
wouldn't be basing your opinion on *I kinda feel...*

Jonathan's argument is similar. He's worried about something that this
thread has tried and failed to determine exactly what is.
Meanwhile I think we have determined that the presumed practical trouble
cases are even less that I suspected up front.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20180725/0c5b83ec/attachment.html>


More information about the Digitalmars-d mailing list