On Fri, Sep 11, 2009 at 10:19, Philip Potter <philip.g.pot...@gmail.com> wrote:
snip
>>> Perl's is not.
>>
>> Define "complete".
>
> If Perl doesn't document ?: properly, its document is not complete.
snip

It defines it well enough that I have never had it produce unexpected
behavior.  If you are unhappy with the documentation, you are welcome
to submit patches to P5P.  I am current unhappy with how perlop is
laid out (it makes it hard to find the documentation for a specific
operator).  As opposed to complaining aimlessly on a list, I am
writing [perlopref][1] which contains every (well, not yet, but soon)
Perl operator (for some [definition][2] of the word) in its own
section.

snip
> I thought I already had! The ?: ternary operator has a guarantee that
> it will *either* evaluate its second *or* its third operand. It won't
> ever evaluate both. Where is this statement in the docs? Can you find
> it? Can you tell me why it's not in perlop?
snip

It is in the docs.  It is assumed you know what "just as in C" and "It
works much like an if‐then‐else" means.  If you feel this language is
not precise enough, then submit a patch.  It isn't hard.  Even if you
don't to submit it to P5P you can submit it to me and I will make sure
it makes it into perlopref (assuming it is correct of course).  Even
if perlopref doesn't make it into the core, it is at least being used
by Padre.  If it isn't made part of the core, I will release it as a
standalone piece of documentation on CPAN.

snip
> In case it isn't clear enough, my question (not directly to you, but
> to the perl maintainers) is "Where does perl document the ternary
> operator's behaviour of only evaluating either the second or the third
> argument, never both?" I have looked in perldoc perlop. If you have a
> better place for me to look, by all means let me know. But if it's not
> in perlop, why isn't it?
snip

It is fully documented in the source code of Perl; as many things are.
 It is not documented the way you want in perlop because most people
understand the way it is currently documented there.

[1] : http://github.com/cowens/perlopref
[2] : technically functions are terms, unary named operators, or list
operators (depending on their prototypes), but I am not documenting
them in perlopref, although, now that I think about it a generic
section each wouldn't be a bad idea.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

--
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