On Friday, 8 February 2019 at 16:00:58 UTC, bitwise wrote:
On Monday, 4 February 2019 at 20:08:39 UTC, Paul Backus wrote:
On Monday, 4 February 2019 at 18:35:37 UTC, bitwise wrote:
[...]

It's actually fine to leave the `return` there unconditionally--you're allowed to return an expression of type `void` from a function.

Example: https://run.dlang.io/is/tnSGN4

Even better ;)

No one else seems particularly excited about the rewrite though - what am I missing?

I suppose a lambda cost significantly more, but I don't think the lambda should make it through the optimizer for this case though.

Immediately called lamdas are always inlined.
  • Re: DIP 1016--ref T ac... bitwise via Digitalmars-d-announce
    • Re: DIP 1016--ref... Dominikus Dittes Scherkl via Digitalmars-d-announce
      • Re: DIP 1016-... bitwise via Digitalmars-d-announce
        • Re: DIP 1... Paul Backus via Digitalmars-d-announce
          • Re: D... bitwise via Digitalmars-d-announce
            • ... Nicholas Wilson via Digitalmars-d-announce
              • ... Dennis via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce
              • ... Dennis via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce
              • ... bitwise via Digitalmars-d-announce
              • ... H. S. Teoh via Digitalmars-d-announce
              • ... Daniel N via Digitalmars-d-announce

Reply via email to