Binding rvalues to ref parameters redux
Nicholas Wilson
iamthewilsonator at hotmail.com
Wed Mar 27 04:11:36 UTC 2019
On Wednesday, 27 March 2019 at 01:38:40 UTC, Andrei Alexandrescu
wrote:
> Work has been underway on redoing DIP 1016. I haven't made a
> pull request yet as it's a bit early. Looking for high-level
> observations:
>
> https://gist.github.com/andralex/e5405a5d773f07f73196c05f8339435a
>
> Thanks in advance for any feedback.
A couple more points.
In the combinatorial explosion example, give the root case an
implementation.
double distance(ref const Point p1, ref const Point p2); // used
by all other overloads
->
// used by all other overloads
double distance(ref const Point p1, ref const Point p2) { ... }
> More discussion on rationale and motivating examples can be
> found in the "Rationale" section of DIP 1016.
Thats fine for a draft, for the real thing this will need to
include those examples. In particular the main points not
included are:
* Its a PITA to get proper composition with higher order function
templates.
* Disruption of pipelines
Under the "Binding Rules" please state the types of the symbols
used up front (Where do Tk and Uk come from? what are they?
Types? Parameters?)
More information about the Digitalmars-d
mailing list