On Friday, 13 November 2015 at 21:48:58 UTC, Rory McGuire wrote:
On Thu, Nov 5, 2015 at 2:02 AM, Jonathan M Davis via Digitalmars-d < [email protected]> wrote:


We've been adding lazy versions of functions for years now, and we've never removed the eager versions. And I'm pretty sure that Walter and Andrei have generally been opposed to the idea of doing so precisely because of the code breakage that it causes. We have been moving towards using lazy range-based functions as much as possible and avoiding adding new eager functions, but that doesn't mean that removing the eager functions is worth the pain that that causes or even that the eager functions aren't worth having.

Surely the eager functions should at least be using the lazy version internally? "more code, more bugs" is often a true statement (not always, but often).

If it doesn't harm the efficiency of the function, then yes, changing an eager function to call the lazy one internally makes sense. If it does harm efficiency, then it's a more debatable question. But the big issue here is simply that we don't want to break existing code just for the sake of moving to lazy range-based functions as the norm in Phobos. I understand the sentiment, but I really don't think that it's worth the code breakage, and I recall Walter and Andrei saying the same.

- Jonathan M Davis

Reply via email to