std.v2020.algorithm etc[ WAS: Is run.d going to be expand for runtime and the phobos library?]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Jun 20 14:52:41 UTC 2020


On 6/20/20 6:03 AM, Petar Kirov [ZombineDev] wrote:
> On Saturday, 20 June 2020 at 09:49:38 UTC, Stanislav Blinov wrote:
>> On Saturday, 20 June 2020 at 04:34:42 UTC, H. S. Teoh wrote:
>>> On Fri, Jun 19, 2020 at 09:14:30PM -0400, Andrei Alexandrescu via 
>>> Digitalmars-d wrote: [...]
>>>> One good goal for std.v2020 would be to forego autodecoding throughout.
>>> [...]
>>>
>>> Another could be to fix up the range API -- i.e, reconsider the 
>>> ugliness that is .save, now that D has copy ctors.
>>
>> How do you see that? Fundamentally, what have copy ctors changed in 
>> this regard?
> 
> I suppose that postblit has had various implementation and language 
> design issues (which copy constructors address), which prevented them 
> from being a reliable alternative to save(). This and probably also 
> class support.

That's not the problem. There'd need to be an API distinction between 
the two that is introspectable. Many input ranges should be copyable, 
which makes them indistinguishable from forward range by means of copy ctor.


More information about the Digitalmars-d mailing list