On Sunday, 2 September 2018 at 21:12:39 UTC, Nick Sabalausky (Abscissa) wrote:
This does make me think of one thing: Shouldn't assert expressions be required to be pure? (even if only weakly pure)

Not sure how much practical problems that would create, but at least in theory it certainly sounds like the right thing.

Exactly. You may still catch assert(!fclose(f)) but not other non-obvious functions.
Nice trick to find them in C:
https://stackoverflow.com/questions/10593492/catching-assert-with-side-effects/35294344#35294344

Reply via email to