Generality creep

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Mar 28 12:37:09 UTC 2019


On 3/28/19 7:59 AM, ag0aep6g wrote:
> On 28.03.19 12:51, Andrei Alexandrescu wrote:
>> The problem is RefRange.
> 
> too terse

Reasoning from first principles would go as follows. Context: algorithms 
are expressed naturally in terms of ranges, and composite (higher-order) 
ranges are built and work with ranges. Event: RefRange comes along, 
exposes an oddity ("save(), copying, and assignment could do slightly 
different things"), breaks a bunch of these structures, and requires 
arcane changes.

The conclusion is not to operate such changes everywhere (i.e. reason by 
analogy). The right conclusion is that save() is unnecessarily general 
and underspecified.



More information about the Digitalmars-d mailing list