Rick Mann wrote:
> On Jan 19, 2009, at 11:50:54, Sohail Somani wrote:
> 
>> I'm pretty sure you've got it backwards. Languages that /require/
>> finally are stupid.
>>
>> For everything else, there's ScopeGuard/RAII.
> 
> 
> I'm not suggesting that C++ should drop support for RAII. I'm saying  
> it's stupid that it doesn't also support finally.
> 
> C++ is about making it easier to write complex code. It can be argued  
> that it's syntactic sugar (as is any language). Not supporting finally  
> means often times forcing the user to write more code, not less, to  
> accomplish a thing.
> 
> I also love Java, and wish it supported RAII (but not at the expense  
> of finally). There's no reason not to have both.

I agree that it is definitely syntactic sugar for C++. However, more
than one level of resource management in a function and you get a maze
of finally blocks which are sometimes impenetrable.

So finally is nice to have, but I don't consider it very scalable for
this reason.

Sorry for not answering your original question, hope someone else does :-)

-- 
Sohail Somani
Hassle-free time tracking for JIRA

Website: http://worklogassistant.com
Blog   : http://blog.worklogassistant.com
Twitter: http://twitter.com/somanisoftware


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to