https://issues.dlang.org/show_bug.cgi?id=14519
--- Comment #19 from Vladimir Panteleev <[email protected]> --- (In reply to Vladimir Panteleev from comment #16) > (In reply to Walter Bright from comment #15) > > It still allocates memory. But it's worth thinking about. Maybe assert()? > > Sure. Wait, now I'm not sure. For some reason I was thinking of assert(false) which will always stop executions. But continuing upon encountering invalid UTF-8 in release mode might result in bad outcomes as well. The problem is that it's impossible to achieve 100% coverage and make sure that all Unicode-handling code in your program also handles invalid UTF-8 in a good way. Thus, an invalid UTF-8 handling problem might not be caught in testing but might cause an unpleasant situation in release mode (depending on what happens next after the assert is NOT thrown). I don't feel too strongly about this though, I think programs that operate on important data shouldn't run with -release anyway. --
