Re: D gets it right
From: David Turner (david_at_firepro.co.za)
Date: 02/13/04
- Previous message: David Turner: "Re: D gets it right"
- In reply to: Mark 'Kamikaze' Hughes: "Re: D gets it right"
- Next in thread: Kevin Cline: "Re: D gets it right"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 13 Feb 2004 09:01:25 +0200
Hi
> There's no way to enforce good behavior in any language. A determined
> asshat can produce bad code regardless of the language's "defenses".
I agree that it is possible, in principle, to violate any constraint place
upon you by a language/system. However, the more difficult this is, the
less likely it is to occur. I humbly suggest that it's far more difficult
to leak a resource that can only be accessed through a scoped sentry object
(which guarantees cleanup), than it is to forget a "finally {
resource.release(); }" block.
> But your point was that Java is incapable of managing resources, and to
> "prove" that point you used broken examples in .NET and Java that would
Careful. I never said it was "incapable" of managing resources. I said it
provided fewer tools to do so than C++. This is a statement of fact, not an
opinion.
> The technique works reliably, is well documented, and makes the flow
> of control obvious. It's not a problem, except to people with an agenda
> and a weak grasp of the facts.
Au contraire. It IS a problem, and a very serious one. I myself have taken
financial damage from resource leaks in the Java-based internet banking site
that I use. Perhaps that means I have an agenda - fair enough. But I think
the accusation that I have a weak grasp of the facts is unfounded.
Regards
David Turner
- Previous message: David Turner: "Re: D gets it right"
- In reply to: Mark 'Kamikaze' Hughes: "Re: D gets it right"
- Next in thread: Kevin Cline: "Re: D gets it right"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|