Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #6428
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail |
|---|---|
| Date | Fri, 22 Jul 2011 18:13:00 -0400 |
| From | Arne Vajhøj <arne@vajhoej.dk> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Needs help in editing |
| References | <1021f122-3898-4fc9-93ed-ac1aa9403b82@q15g2000yqk.googlegroups.com> <4e03bfb7$0$23665$426a34cc@news.free.fr> <4e03c0a3$0$23665$426a34cc@news.free.fr> <4389af7c-3124-42ea-b092-54999cff42c2@z7g2000prh.googlegroups.com> <4e04e54a$0$6275$426a34cc@news.free.fr> <iu7qcd$g7l$1@news.albasani.net> |
| In-Reply-To | <iu7qcd$g7l$1@news.albasani.net> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Lines | 43 |
| Message-ID | <4e29f5f1$0$304$14726298@news.sunsite.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
| NNTP-Posting-Host | 72.192.23.157 |
| X-Trace | news.sunsite.dk DXC=1>5gMO0k7oDNc7PehKo47KYSB=nbEKnkKTUCR5gQKU5IJPe3\kP5EUAKBm9cfh9BSDM2;kT<[:>[Ak>Sm^2Kb<>DJ\B5AVo3fUD |
| X-Complaints-To | staff@sunsite.dk |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:6428 |
Show key headers only | View raw
On 6/26/2011 1:30 PM, Lew wrote: > Aéris wrote: >> lewbloch a écrit : >>> Reflection is an elephant gun for >>> shooting fleas; simple polymorphism suffices in most cases. > >> I totally aggree. >> >> But with this (craps) code and because constructors with different >> prototype, reflection is unavoidable? >> > > Reflection is mostly avoidable. A little light use of > 'Class#newInstance()' with package-private builders called by a factory > method isn't very risky and avoids the typical mad craziness of looking > up 'Method' or 'Constructor' instances. If you're going down that latter > route, leave programming to those better equipped for it. > > If you think heavy use of reflection will fix crappy code, boy are you > ever wrong. Shit piled on top of shit only smells worse. It depends a little bit about what you are doing. I would not want to implement a Java EE 6 server without being allowed to use reflection. Even some business code can use some reflection even though in most cases it is better to hide the reflection via some DI framework. Reflection is a very useful tool and a very powerful tool. One should just limit its use to where it is necesarry. A B-52 bomber is also pretty powerful if you want to engage in a war. It is not the correct tool for getting rid of the mosquitos in the house. Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Needs help in editing Eric <ehtisham@gmail.com> - 2011-06-23 11:25 -0700
Re: Needs help in editing Aéris <aeris@imirhil.fr> - 2011-06-24 00:35 +0200
Re: Needs help in editing Aéris <aeris@imirhil.fr> - 2011-06-24 00:39 +0200
Re: Needs help in editing lewbloch <lewbloch@gmail.com> - 2011-06-24 08:42 -0700
Re: Needs help in editing Aéris <aeris@imirhil.fr> - 2011-06-24 21:28 +0200
Re: Needs help in editing Lew <noone@lewscanon.com> - 2011-06-26 13:30 -0400
Re: Needs help in editing Aéris <aeris@imirhil.fr> - 2011-06-26 21:49 +0200
Re: Needs help in editing Lew <noone@lewscanon.com> - 2011-06-26 16:32 -0400
Re: Needs help in editing Lew <noone@lewscanon.com> - 2011-06-26 16:35 -0400
Re: Needs help in editing Arne Vajhøj <arne@vajhoej.dk> - 2011-07-22 18:13 -0400
Re: Needs help in editing lewbloch <lewbloch@gmail.com> - 2011-07-22 15:52 -0700
Re: Needs help in editing rossum <rossum48@coldmail.com> - 2011-06-23 23:42 +0100
Re: Needs help in editing William Colls <william.colls@rogers.com> - 2011-06-23 22:40 -0400
Re: Needs help in editing Lew <noone@lewscanon.com> - 2011-06-26 13:40 -0400
Re: Needs help in editing Roedy Green <see_website@mindprod.com.invalid> - 2011-06-27 20:05 -0700
Re: Needs help in editing Lew <noone@lewscanon.com> - 2011-06-28 00:09 -0400
csiph-web