![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
I believe it's far finer and harder to always be polite and mature on Usenet but that's my standards. Not all follow them, sadly. So much for that. |
|
As for the being tough on the Usenet, please see this image. I always take a look at it when feeling like responding "toughly". It is about reading toughly, not replying. http://www.uberh4x0r.org/~lethalp1mp...nny/retard.jpg After i've taken a look at that image, i ALWAYS loose my steam and reword my reply. I don't want to be that "tough on Usenet". ![]() This is not funny (or relevant). |
|
Score adjusted |
#22
| |||||||
| |||||||
|
|
Henry wrote: snip In "javascript:The Good Parts", Douglass Crockford writes: "An if or while or do or for statement can take a block or a single statement. I'm surprised he says that. It shows a surprising lack of knowledge. |
|
The single statement form is another attractive nuisance. It offers the advantage of saving two characters, a dubious advantage. It obscures the program's structure so that subsequent manipulators of the code can easily insert bugs." It's a matter of taste and common sense. |
|
If curly brackets are hidden away so it's difficult to notice them then obviously people risk not noticing when they're absent. On the other hand, if a block statement looks like a distinct statement, which it is, |
|
then its absence will be noticed : if (a < 0) b = 2; if (a < 0) { b = 2; c = 4; } |
|
(and unsurprisingly JSLint will not pass code that omits the braces). It's a good rule if you hire programmers who are untidy, sloppy, and don't really know what they are doing. Otherwise, it hides the structure of the program and is rather insulting. |
|
My assertion that "It is very widely considered good style ..." is not without foundation. A lot of things are very widely considered good - eval and monster libraries for instance - but they aren't. |
|
Here, it's not bad but anyone who says it's the one true way is wrong and a loudmouth. |
#23
| |||
| |||
|
|
On May 23, 12:13 pm, John G Harris wrote: Henry wrote: It's a good rule if you hire programmers who are untidy, sloppy, and don't really know what they are doing. Otherwise, it hides the structure of the program and is rather insulting. How does it hide the structure of the program? |
#24
| |||
| |||
|
|
Den 2008-05-23 11:17:11 skrev Tim Streater <tim.streater (AT) dante (DOT) org.uk>: In article <69mvq6F33o7alU1 (AT) mid (DOT) individual.net>, "K Viltersten" <tmp1 (AT) viltersten (DOT) com> wrote: After i've taken a look at that image, i ALWAYS loose my steam and reword my reply. I don't want to be that "tough on Usenet". ![]() I feel I should point out that "lose" is spelt "lose" and not "loose". I thought it was: loose, loosing, lost, have lost... Well, one learnes something new every day. Thanks. |
#25
| |||
| |||
|
|
Another thing that guys will say is not to use an early return. I also disagree with this, as I think that, as an absolute rule, it is encumbering to the author and reader. snip |
#26
| |||
| |||
|
|
On May 23, 12:13 pm, John G Harris wrote: |
|
On the other hand, if a block statement looks like a distinct statement, which it is, It is difficult to see how a statement that contains other statements can ever look like a distinct statement. snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |