[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: [zzdev] Re: [zzdev] :zz: Prototypes?



> On Tue, Nov 17, 1998 at 11:02:45PM +0900, Ted Nelson wrote:
> > I have to admit, I don't know what Prototypes are.
> > Can it be told quickly ?-)
> 
> Function prototypes provide some additional information about the
> calling conventions for a function so that the compiler can identify
> cases where you have called the function inconsistently.

That is what they do in C, but not in Perl.  In Perl, they change the
parsing and calling semantics to give a user-defined function the
syntax and behavior of a built-in function.

Sometimes that behavior includes certain kinds of argument checking,
and sometimes it doesn't, and often it includes checks that you don't
want.