D-ark corners - algorithms, ranges, and auto ref - best practices guides.

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jul 23 17:17:25 UTC 2019


On Tue, Jul 23, 2019 at 01:51:42PM +0000, aliak via Digitalmars-d wrote:
[...]
> With some help from the forums, the essence of the problem was the
> following:
> 
> 1. algorithm returned by auto ref.
> 2. the range's front was "ref front() {...}"
[...]

Isn't this precisely the sort of problem dip25 / dip1000 are supposed to
catch?  Are you compiling with -dip25 -dip1000?  Are DIP25/DIP1000 (or
their current implementations) not catching this particular case for
some reason?


T

-- 
I've been around long enough to have seen an endless parade of magic new
techniques du jour, most of which purport to remove the necessity of
thought about your programming problem.  In the end they wind up
contributing one or two pieces to the collective wisdom, and fade away
in the rearview mirror. -- Walter Bright


More information about the Digitalmars-d mailing list