in reply to Re: Perl disproves commutativity of Addition/Multiplication
in thread Perl disproves commutativity of Addition/Multiplication

You are allowed to use predeclared subroutines without parenthesis, but the docs don't say that you always get the same result as with parens

You're right ... being "allowed" to do something doesn't mean anything more than it "won't produce a fatal error". (Got suckered by that one ;-)

Not that I'm interested in pursuing the matter, but I think the documentation *could* have taken the extra step of warning that removing the parens could cause unexpected results. I see other documentation that takes that extra step, and I (fallaciously) start to believe that if the docs don't mention any traps then there aren't any.

Thanks to all respondents.

Cheers,
Rob
  • Comment on Re^2: Perl disproves commutativity of Addition/Multiplication

Replies are listed 'Best First'.
Re^3: Perl disproves commutativity of Addition/Multiplication
by moritz (Cardinal) on Jan 24, 2012 at 07:04 UTC

    Then by all means, submit a patch to p5p that improves the documentation.

    In my experience, the Perl 5 hackers are very open to doc improvements, and haven't rejected any of my doc patches. You really should try it.