Problems? Is your data what you think it is? | |
PerlMonks |
Re: Re: Re: where do you put your subsby demerphq (Chancellor) |
on Mar 08, 2002 at 13:52 UTC ( [id://150312]=note: print w/replies, xml ) | Need Help?? |
where the first paragraph is your general outline (moving from general to hypothesis with each sentence). Succeeding paragraphs are the specifics that support your hypothesis. I strongly believe code should follow this method because coding is just another form of writing and communicating. Think about it. Your analogy doesnt makes sense. The main is in essence the conclusion of an argument. So what you are saying is that when I write an argument I should put the conclusion before the introduction. Also, you are talking about aesthetic reasons. I am talking about best practice. Best practice is that which minimizes the chance of bugs and error, not that which reads like a novel. If you want to read nice text then read the comments. The code should be written so as to be as maintainable and error free as possible. And if you rearranged my code as you said there is a very good chance it wouldnt run. I do like not using parens when they arent necessary as they often end up occluding the intent in a mess of parens, much as lisp is practically unreadable for most mere mortals. Consider
Err. maybe not the best example but I know which of the two I find easier to write and to read.
UPDATE: END UPDATE BTW: I am a Pascal programmer by background. But that is neither here nor there. In C you cant use a sub until it has been declared either,(Both allow the use of forward declarations, as does perl,) in fact most true compiled languages share this trait. Cheers,
Yves / DeMerphq
In Section
Seekers of Perl Wisdom
|
|