Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #5678

Re: Needs help in editing

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: Needs help in editing
Date Sun, 26 Jun 2011 13:30:56 -0400
Organization albasani.net
Lines 24
Message-ID <iu7qcd$g7l$1@news.albasani.net> (permalink)
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>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
X-Trace news.albasani.net 8hLTIlg21zI6WctbWng+HlkYrv5oWbq3C5GR4UTLLZRJAJyWXvU8O9ozQH4ihfRpINiCzeVomThlTc3mb9OavNa0jRMOJzUxEpL4K9sRtnBh7bpVTOnpLkaqKLP8pBcF
NNTP-Posting-Date Sun, 26 Jun 2011 17:30:53 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="b1Fc9Sq/rI0d8oKHFZdm1cffOQb3kLopsfWjSjh/AU1ojn6qraOp/Hah3487ERadquu2S639ALnsBdV6KaBHP+0F9tBeJt+Fvi6kwRFh785Dd3qzCtIWzQMiVZxyvlKK"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
In-Reply-To <4e04e54a$0$6275$426a34cc@news.free.fr>
Cancel-Lock sha1:mkMBB+L97MKaKvbnmPnLh13g+CI=
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5678

Show key headers only | View raw


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.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


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 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