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

Jonathan M Davis <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
                   |                            |m

--- Comment #2 from Jonathan M Davis <[email protected]> ---
In the majority of cases, ranges either assert that the range is not empty when
front is called, or they don't check at all, and I wouldn't expect that to
change - not only because of efficiency concerns, but also because of @nogc
(and exceptions currently require the GC). It's simply considered a logic error
to call front or popFront on an empty range. So, if there's any chance that a
range is going to be empty when you're looking to call front or popFront, then
you need to check empty first.

--

Reply via email to