the loop advancement example is not very convincing because it can easily be dealt with by using for() instead of while() which is much simpler than the alternative you are proposing.
I also wonder if an local struct with a destructor and a corresponding variable wouldn't be simpler than the scoped example or alternatives like unique_ptr or shared_ptr or boost::scoped_ptr that already provide much of the functionality you are proposing.
The example given as Motivation B calls for a dedicated RAII class for CriticalSection IMHO, so again not very convincing.
IMHO it would greatly improve your paper if you would provide additional examples showing the "uglyness" of using existing alternatives to your proposal, i.e., DIY local structs with destructors, or "misusing" unique_ptr/shared_ptr for that purpose, in contrast to scoped_function and scoped_resource.
Also providing the no-delete value is not very convincing. What if all values less than zero are "no-delete", or 7, 23 and 42? It complicates the class and API and doesn't serve a general purpose. Usually a predicate is used in other cases to provide a hook for bool checks.
Just my CHF0.02 from a quick scan.
Peter.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
std-proposal...@isocpp.org.
> To post to this group, send email to
std-pr...@isocpp.org.
> Visit this group at
http://groups.google.com/a/isocpp.org/group/std-proposals/?hl=en.
>
>
> <proposal.html>
--
Prof. Peter Sommerlad
Institut für Software: Bessere Software - Einfach, Schneller!
HSR Hochschule für Technik Rapperswil
Oberseestr 10, Postfach 1475, CH-8640 Rapperswil
http://ifs.hsr.ch http://cute-test.com http://linticator.com http://includator.com
tel:
+41 55 222 49 84 == mobile:
+41 79 432 23 32
fax:
+41 55 222 46 29 == mailto:
peter.s...@hsr.ch