https://issues.dlang.org/show_bug.cgi?id=17363
--- Comment #2 from ki...@gmx.net --- > The slice should be loaded before evaluation of slice arguments, then length > is safe to cache, see issue 17364. Your argument for loading & caching length and pointer before evaluating the bounds expressions being? I mean it's perfectly safe and IMHO less awkward the other way around, loading the current length for each $ and loading the base pointer after evaluating the bounds expressions, with full side effects visibility for lvalue slicees. People do come up with (arguably bad) code where this matters: https://github.com/ldc-developers/ldc/issues/1433 --