https://issues.dlang.org/show_bug.cgi?id=19587

Dennis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Hardware|x86_64                      |All
                 OS|Linux                       |All

--- Comment #1 from Dennis <[email protected]> ---
Just got hit by this today, my `generate!(() => readln()).take(10).array`
discarded the line after the 10 lines put into the array.

This is really annoying, but changing this would be a breaking change, so I'm
afraid the fix would be either:

- a template parameter 'caching' with default value of `true`
- a new synonym symbol, similar to `approxEqual => isClose`, with the
possibility to deprecate the old symbol (caching can still be achieved by doing
`generate!(f).cache`). I'm not sure what that synonym would be, things that
come to mind are `generateLazy`, `successiveCalls`, `repeatEvaluate`, but I'm
not a big fan of them.

--

Reply via email to