C++ is not a scripting language. Give me a scripting language that does that so I can research and compare.
sub do_stuff {
my $thing = Thing->new; # no need to manually destroy thing. Its DESTROY method will be called at the closing brace.
}In the end, they all make trade offs depending on the "whim" of the language designer.
> Many scripting languages in practice do reference counting GC that will reliably and deterministically clean up resources other than memory.
When challenged, you offered one. So, is this a Perl-only thing, or can you give other examples?