I do not think that adding more language facilities are a good way to
solve that problem.
I would just add a note that neither scope_success nor scope_fail work
as one might expect if used in a coroutine.
And I believe that scope_fail in gor's example should actually be
called, because one is exiting the coroutine (implicitly) with an
exception, so destroying locals happens under exceptional stack
unwinding and IMHO that is intended.
gorni...@gmail.com wrote:
> For this problem to go away, scope_fail / scope_success should be
> language facilities, not, clever tricks using, formerly non-standard,
> implementation details of the current crop of compilers.
--
Prof. Peter Sommerlad
Institute for Software: Better Software - Simple, Faster!
HSR Hochschule für Technik Rapperswil
Oberseestr 10, Postfach 1475, CH-8640 Rapperswil
http://ifs.hsr.ch http://cevelop.com http://linticator.com
tel:
+41 55 222 49 84 == mobile:
+41 79 432 23 32
fax:
+41 55 222 46 29 == mailto:
peter.s...@hsr.ch