On Fri, Sep 11, 2009 at 03:19:53PM +0100, Philip Potter wrote:

> If C can document ?: properly, why can't perl? The size of each
> language has nothing to do with this.

> If Perl doesn't document ?: properly, its document is not complete.

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

One of the nice things about perl is that if you find a problem with it
you have everything you need to fix it.  That's also true for the
documentation.

But writing documentation is not easy.  Or, at least, writing good
documentation is not easy.  In many ways, one of the problems with
perl's documentation is that there is too much of it.  A drive by doc
patch is relatively simple and may obviously improve one section of the
docs, but it could also very easily contribute to the overall general
degradation of the docs.

For example, adding a section to the docs about how perl evaluates the
operands to ?: may well scratch this itch, but then someone else may
wonder whether the RHS of *= is always evaluated.  So it's possible that
the documentation would be better served by noting the general behaviour
of how and when operands are evaluated.  (This is just an example.  I've
not looked into this in any detail.)

But, having said that, if you think you can improve perl, have at it!

-- 
Paul Johnson - p...@pjcj.net
http://www.pjcj.net

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