🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #18405

Re: undebuggable code

#18405
From: Gerry Mantha
Date: Thu, 25 Jun 1998 00:00
36 lines
2146 bytes
John, all ide's seem to have problems with anonymous inner classes.  Hech,
why shouldn't they, they're anonymous.  It really isn't a great design
decision to use inner classes for spinning threads or providing any kind of
complex functionality.  I know I might get flamed on this one, but to me
their use should be restricted to simple instanciations to support
call-backs and such.  Don't get me wrong, I do use inner classes, but for
anything much more complex than described they can make a poor other
programmer's head spin.

John Collins wrote in message <6msi3a$lpr16@forums.borland.com>...
>It seems if you write an anonymous inner class, that is derrived from one
>that implements Runnable, when you spin up a Tread with it, you can't trip
>the breakpoints in it you have set.
>
>Now, that seems almost reasonable given the fact that the debugger is only
>uh human, but I have heard/read no caveats warning against _not_ writing
>such code.
>
>If you name the anonymous classes and make them "conventional" then the
>breakpoints work fine.  I have spent a few evening sessions unrolling such
>code recently.  Kind of sucks.  Hopefully people will be avoiding this in
>the future.  Is there a FAQ yet on things to do or not do in Java to help
>you debug your code?
>
>Seems like Java is _potentially_ far more debuggable than C++, in fact it
>probably is no matter what you do.  But there are a few gotchas that C++
>experience will not help you with.  Just good guesswork and experience.  Be
>nice to have that stuff in a FAQ.
>
>--
>John Collins   mailto:jcollins@access.digex.net
>http://www.access.digex.net/~jcollins
>
>
>
Technical Details
Message-ID: <6muu09$nuj6@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <6msi3a$lpr16@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,18a503a47b7cea9b
X-Google-Attributes: gidf74b3,public
From: "Gerry Mantha" <gmantha@home.com>
Subject: Re: undebuggable code
Date: 1998/06/25
Message-ID: <6muu09$nuj6@forums.borland.com>
X-Deja-AN: 366161742
References: <6msi3a$lpr16@forums.borland.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.1
Organization: QTECH Hybrid Systems Inc.
Newsgroups: borland.public.jbuilder.java.language