Then maybe there should be the only one description?!
I mean that it is enough to describe one operator, and only get a link to it with explanation that difference is only precedence. This would become SPOT - single point of thuth.
I suggest to rename these two groups of operators.
1. They are EQUIVALENT except for their precedence, that means that they are both C-style or both not-C-style. Am I right?
2. The name of operators should differ in the way they differ from each other, so I suggest for example: 'Low-precedence-Logical-And' and 'High-precedence-Logical-And'.
3. As 'and' ('or') operates on so called "conditional" (on its left side) and also it returns the last evaluated expression (or so), I suggest further to rename it from 'Logical-And' to something else, if someone can find more suitable name. E.g. I would suggest 'Conditional-And' (therefore 'High/Low-precedence-Conditional-And'), how does it sound?
Also I suggest to make a link from documentation of operator 'and' to the documentation of statement 'if then' or vice versa. Why? For having SPOT. All the same behavior in one place, except for explanation of differences(?) (as I know they are not fully equivalent, because we can not use the return value of 'if' directly (e.g. we needs to envelope it with
do{ })).
How do you think?
Upd.: Oh... I just realized that I made a suggestion (in 3rd point) the same as it is used in Java as you wrote earlier :( (
Re^4: Situation where warning "Found = in conditional, should be" seems obsolete (documentation - C terminology)).
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.