in reply to Re^2: Read all the file path having text document
in thread Read all the file path having text document

To me; prototyping keeps me from making subtle design changes (just 1 extra arg, in this special case) that are not documented, and probably will cause maintenance problems later.
If you're doing that, you don't understand what prototypes do (and this is common, and one of the reasons for the general rule that you shouldn't use them unless you've got a good reason).

Prototypes in perl convert arguments and allow short-cuts in the calling code. The "checking" of the arguments only happens as a side effect, and you'll only get warnings/errors if the arguments cannot get converted. This probably means you'll have subtler bugs, not less.

See also Are prototypes evil?, for example

  • Comment on Re^3: Read all the file path having text document

Replies are listed 'Best First'.
Re^4: Read all the file path having text document
by Wiggins (Hermit) on Dec 01, 2008 at 00:10 UTC
    Ok ... Perl prototypes are really "context casts", and that seems dangerous ( I will be commenting out all of mine). Not the 'prototype' that the software industry has been using for the last 30 years, across hundreds of languages. But, I do hope that 'addition' is a mathematical operation and not a name for shuffling of the bits with truncation of the overflows.

    Bad re-use of nomenclature.

    EOM