bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: perl-mode - fix syntax of anonymous sub prototypes


From: Joost Diepenmaat
Subject: Re: perl-mode - fix syntax of anonymous sub prototypes
Date: Sat, 29 Mar 2008 16:39:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Giuliano Procida" <address@hidden> writes:

> Joost Diepenmaat wrote:
>
>> Just FYI, prototypes on anonymous subs are useless. As in; discarded by
>> the perl interpreter. I'm actually surprised it's even valid syntax.
>
> We are getting off-topic here but I disagree. It is useful to the
> programmer or maintainer to see the argument structure at a glance
> (especially when writing a lot of functional-style code). [ snip ]

Except that that's not what (most) prototypes do in perl. At least not
when they're actually used by the compiler. If they're discarded you can
of course use them for whatever documentation you like, but you'd still
be confusing readers who think you to expected them to "work".

Just in case:
http://library.n0i.net/programming/perl/articles/fm_prototypes/

>> Also, I would strongly recommend cperl-mode (which in fact does
>> recognize the construct) instead of perl-mode.
>
> I have found cperl-mode's defaults rather unpleasant and I don't want
> to spend ages customising it to my taste (i.e., make it look like
> perl-mode). I just use perl-mode and I will be happy if I can fix the
> few issues I have with it.

Fair enough.

-- 
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]