commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elliotte Harold <elh...@metalab.unc.edu>
Subject Unnecessary casts in Commons-Math
Date Fri, 14 Oct 2005 11:37:22 GMT
I loaded Commons-Math into Eclipse, which promptly complained about 
numerous unnecessary casts. For example, this cast to double in 
LaguerreSolver.solve:

         Complex N = new Complex((double)n, 0.0);
         Complex N1 = new Complex((double)(n-1), 0.0);

If I submitted a patch to remove these unnecessary casts, would it be 
likely to be accepted or rejected? Personally I find extra code like 
this to be very ugly, but I know some programmers and projects like 
these casts. If the commons-math policy is to use these, I'll set my 
Eclipse project preferences to ignore this. If not I can patch it. What 
do people prefer?

-- 
´╗┐Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message