🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #1012

Re: A better experimental::scope_exit

#1012
From: David Brown
Date: Mon, 23 Nov 2026 16:58
41 lines
3317 bytes
On 23/11/2026 16:54, Bonita Montero wrote:
> Am 23.11.2026 um 16:45 schrieb David Brown:
> 
>> Claiming things are "obvious" or that others "lack imagination" is
>> an excuse for being unable or unwilling to explain your own thoughts.
> 
> It's just one screenpage of code. And the code itself is simpler than
> any real world application. So where's the problem ?
> 
>> If you have trouble explaining things, then the suggestions below will 
>> help.  If you are simply unwilling to do so, then why bother posting
>> the  code in the first place?  It is unusable to others as it is, and
>> contains nothing particularly innovative.
> 
> Then you still don't understand what I did.
> 
> 
>> Figure out what you want to achieve.  Figure out how the code should 
>> be used.  Specify it, describe it, document it.  Show examples.  
>> Compare it to existing solutions.  Show why your "defer" class with 
>> "Dependent" pointers is necessary, and better than a single "standard" 
>> scope_exit function that does more than one thing, or multiple 
>> "standard" scope_exit calls.
> 
> The ide is somewhat unusual, but as the code is very short it's
> not hard to understand.
> 
>> Explain why  single "Dependent" is enough, rather than accepting 
>> multiple "Dependents".  Explain what you mean by "Dependent" in the 
>> first place.
> I see: you didn't understand the code.
> The dependents could be cascaded.
> 

The code is not the problem.  The /purpose/ of the code is the problem.

Since you apparently cannot or will not give any explanation or usage of 
the code, there is nothing more to be said about it.  In the future, I'd 
recommend you send such pointless code straight to /dev/null and don't 
bother posting anything you are unwilling to talk about.
Technical Details
Message-ID: <11e1rbg$22g6f$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11dsk17$8ske$2@raubtier-asyl.eternal-september.org> <11e1bd7$1rqma$1@dont-email.me> <11e1gtl$1u1jq$1@raubtier-asyl.eternal-september.org> <11e1i1q$1ugou$1@dont-email.me> <11e1is8$1ur7r$1@raubtier-asyl.eternal-september.org> <11e1n3c$20kso$1@dont-email.me> <11e1nk8$20rs6$1@raubtier-asyl.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: David Brown <david.brown@hesbynett.no>
Newsgroups: comp.lang.c++
Subject: Re: A better experimental::scope_exit
Date: Mon, 23 Nov 2026 17:58:24 +0100
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <11e1rbg$22g6f$1@dont-email.me>
References: <11dsk17$8ske$2@raubtier-asyl.eternal-september.org>
 <11e1bd7$1rqma$1@dont-email.me>
 <11e1gtl$1u1jq$1@raubtier-asyl.eternal-september.org>
 <11e1i1q$1ugou$1@dont-email.me>
 <11e1is8$1ur7r$1@raubtier-asyl.eternal-september.org>
 <11e1n3c$20kso$1@dont-email.me>
 <11e1nk8$20rs6$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 23 Nov 2026 16:58:25 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="2179279"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19g1kKqP/jmRAQ42RJt5OoBWs02tGv53IQ="; posting-host="4c393d4ea759cbe76e4062837f9f8a62"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Ky/5V6FkUGV4F8BVQjf9SE51hgg= sha256:NPzkoAy1brfFYKXIAjxiZRFOC8CIMPvASNr9/HjzDXc=
	sha1:+WTXHm2V/b0jzaeCdG1ItHbl0bw= sha256:MDoqKrItl/SWo5/sIHjiAt3wAvncftkIB4ILc4oU0QY=
Content-Language: en-GB, nb-NO
In-Reply-To: <11e1nk8$20rs6$1@raubtier-asyl.eternal-september.org>