Re: [PATCH] gitweb: Uniquify usage of subroutine prototypes

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

 



On 25/03/2008, Junio C Hamano <junio@xxxxxxxxx> wrote:
>  I am not saying that Perl prototypes is a bad thing.  The point of the
>  prototype is to change the syntax and semantics so that you can write a
>  function to which arguments are _not_ passed as a flattend list, and
>  without them you cannot write something that emulates "push @a, $b, $c".

I would agree with what Junio says here. The primary motivation of
prototypes was to emulate the syntax of perl built-ins, and their
extension (with the _ character) in Perl 5.10 has followed this
general principle. As a general rule, I tend to avoid using prototypes
for 'normal' functions. That's mostly an application of the least
surprise principle.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux