[Return of the clones]
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Directory Project > [Return of the clones]




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    [Return of the clones]  
Emmanuel Lecharny


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-28-07 12:11 AM

David Jencks wrote:
>
> On Oct 27, 2007, at 11:56 AM, Alex Karasulu wrote:
> 
>
> I doubt I have a clearer understanding but Joshua Bloch's Effective
> Java has 8 pages pointing out how hard it is to write clone methods
> correctly and the problems they cause and how copy constructors or
> factory methods have much clearer semantics and implementations.  I
> never feel like I know what is going to happen when I call clone :-)

Beside being the worst episode of Star Wars, I wouls say that clone is
not my favorite Java feature, but I used it a couple of times without
problems. The rules I have adopted were pretty simple : if it start to
be complex, stop using clone... In fact, when it's strait forward, like
you have a flat object, or a very simple inheritance scheme, clone() is
an option. Otherwise, a good factory or copy() constructor is the way to
go.

When performance is an issue, then clone may become a candidate, but
with a lot of caution...

E.clone() (or is it E.clown() ? ;)







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:13 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register