Re: Ot: opinions vs facts
optimistx wrote on 21 sep 2008 in comp.lang.javas cript:
The idea's or experiences of jslint do not prove anything.
I concede it is more resilient,
but that does not warrant a general advisory rule.
Example:
Not using javascript is very resilient.
It even is a good advice in cases where html only get you as or more
easily to the same end.
I do not attack your believes. I attack the advice with "always".
I think it is wrong to advice such semantics.
Example:
I love nicely indented code,
but there are situations it does not add to the usefullness,
but instead is even harmfull.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
optimistx wrote on 21 sep 2008 in comp.lang.javas cript:
Evertjan. wrote:
...
>
Yes, I was, thanks for the correction.
>
If we consider everyday language expression
>
'...good recommendation to use {} in all ifs and loops'
>
we may ask :' if it is not a good recommendation, what is it? Bad?'.
>
http://jslint.com recommends:
>
--- start of quote ---
'
Required Blocks
JSLint expects that if and for statements will be made with blocks
{that is, with statements enclosed in braces}.
>
JavaScript allows an if to be written like this:
>
if (condition)
statement;That form is known to contribute to mistakes in projects
where
many programmers are working on the same code. That is why JSLint
expects the use of a block:
>
if (condition) {
statements;
>}Experience shows that this form is more resilient.'
>
---end of quote ---
>optimistx wrote on 21 sep 2008 in comp.lang.javas cript:
>... good recommendation to use {} in ALL ifs and loops' ...
>>
>I do not agree with that.
>>
>>
>You were on the wrong track.
>>
>I do not agree with that.
>>
>>'about everyone' might not be correct official English, but I
>>as a foreigner understand that meaning 'almost all'. And how many
>>percent of all that might be? at least 51%? at least 75 %? at least
>>90%?
>>as a foreigner understand that meaning 'almost all'. And how many
>>percent of all that might be? at least 51%? at least 75 %? at least
>>90%?
>You were on the wrong track.
Yes, I was, thanks for the correction.
>
If we consider everyday language expression
>
'...good recommendation to use {} in all ifs and loops'
>
we may ask :' if it is not a good recommendation, what is it? Bad?'.
>
http://jslint.com recommends:
>
--- start of quote ---
'
Required Blocks
JSLint expects that if and for statements will be made with blocks
{that is, with statements enclosed in braces}.
>
JavaScript allows an if to be written like this:
>
if (condition)
statement;That form is known to contribute to mistakes in projects
where
many programmers are working on the same code. That is why JSLint
expects the use of a block:
>
if (condition) {
statements;
>}Experience shows that this form is more resilient.'
>
---end of quote ---
I concede it is more resilient,
but that does not warrant a general advisory rule.
Example:
Not using javascript is very resilient.
It even is a good advice in cases where html only get you as or more
easily to the same end.
and I believe that this IS a good recommendation and I believe most
other writers in this newsgroup agree with that :).
other writers in this newsgroup agree with that :).
I think it is wrong to advice such semantics.
Example:
I love nicely indented code,
but there are situations it does not add to the usefullness,
but instead is even harmfull.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Comment