On 02/11/2014 02:21 AM, shawn wilson wrote:
why not add more code that doesn't do anything useful? code is not telling the 
computer what to do. code is for telling the reader of the code what your 
logical decisions are.

On Tue, Feb 11, 2014 at 1:13 AM, John SJ Anderson <geneh...@genehack.org> wrote:


TL;DR - if you can't offer a positive reason why you're doing this --
and "it doesn't seem to hurt anything" is *not* a positive reason --
then you shouldn't do it.


Ok, good points.

Wish there was an example of where to look to see how this is bad or
causes unreadable code, but I guess I'll see it eventually and know it
now.


i don't understand why you need an example. it is just code that doesn't do anything useful and you understand why. your own code is the example that you seek. it isn't unreadable, it is just distracting from your purpose in the sub. since it isn't needed, remove it.

here is one other way to think about it. it has been said that code will average about 1 bug per 100 lines of code no matter the language. so it behooves the coder to write fewer lines of code to do the job (until it gets to be so concise as to really be unreadable). getting rid of dead code is part of coding. you don't leave it around.

uri

--
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers
http://PerlHunter.com

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to