On Tuesday, 6 March 2018 at 03:21:47 UTC, Nick Sabalausky (Abscissa) wrote:
Wait, seriously? Phobos frequently passes ranges by value?


You *should* pass most ranges by value, just like how you should rarely use `ref T[]` or `T[]*`. Ranges, like slices, are typically already small references to some other container.

Where Phobos effs it up is not follow its own rules on range.save in most cases... Jonathan talked about this at dconf IIRC in 2015.

The definition of "what is a forward/non-forward range" for struct-based ranges should have been "is this() @disabled (non-forward range), or is this() enabled *and* does the same thing as .save (forward range)?"

yeah.
  • Article: Why Const S... Jonathan M Davis via Digitalmars-d-announce
    • Re: Article: Wh... H. S. Teoh via Digitalmars-d-announce
    • Re: Article: Wh... Nick Sabalausky (Abscissa) via Digitalmars-d-announce
      • Re: Article... Jonathan M Davis via Digitalmars-d-announce
      • Re: Article... Steven Schveighoffer via Digitalmars-d-announce
      • Re: Article... Adam D. Ruppe via Digitalmars-d-announce
        • Re: Art... Jonathan M Davis via Digitalmars-d-announce
          • Re:... H. S. Teoh via Digitalmars-d-announce
            • ... Jonathan M Davis via Digitalmars-d-announce
            • ... Martin Nowak via Digitalmars-d-announce
              • ... Jonathan M Davis via Digitalmars-d-announce
        • Re: Art... SimonN via Digitalmars-d-announce
        • Re: Art... jmh530 via Digitalmars-d-announce
        • Re: Art... Steven Schveighoffer via Digitalmars-d-announce
          • Re:... H. S. Teoh via Digitalmars-d-announce
            • ... Jonathan M Davis via Digitalmars-d-announce

Reply via email to