[Top][All Lists]

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

Re: [Nmh-workers] replyfilter

From: Ken Hornstein
Subject: Re: [Nmh-workers] replyfilter
Date: Mon, 18 Feb 2013 10:08:41 -0500

>I just now discovered replyfilter, and I am very grateful for it (I was
>just on the brink of writing it myself).

Well, I think you'd find that the hard parts of replyfilter is not
really replyfilter itself, but the nmh stuff that was required to make
it happen (I wrote both).  So obviously I'm the person to comment on it.

>1. Is there any reason for the function prototypes (the ($$*) after
>subs)? The general wisdom among Perl hackers is to not use it unless you
>know you need them as they can add subtle bugs. The perlsub(1) manual
>page states:
>    "the intent of this feature [prototypes] is primarily to let you
>    define subroutines that work like built-in functions,"

Errrr ... is it?  I guess I'm old-fashioned, but I kinda prefer prototypes
on my functions; I'm not plugged into any "Perl hackers" community, so I
can't speak for best practices.  But ... from that same man page:

       It’s probably best to prototype new functions, not retrofit prototyping
       into older ones.

Ok, some googling around leads me to the common wisdom that they're bad,
but when I try to understand _why_ they're bad people start using words
like "polymorphism", and my eyes glaze over.  I don't think I can really
digest this right now, but let me ruminate on it.

>And I can't see any calls like that anywhere in the code. Additionally
>the declaration of the subroutine must come before the call site for the
>prototypes to be checked (this is not the case).

Hm, I didn't know that.  Like I said, let me think about it ... you've
made a good point.

>2. Currently it displays all text parts inline. I would like it to not
>display text parts that has 'Content-disposition: attachment'.

Hm.  Okay, I can see why you'd want that (although that doesn't happen
if there's a multipart/alternative, but that's minor quibbling).

I can't speak for anyone else and I very rarely get text parts as
attachments; when I do, the odds are about 50% I might want to quote
them in a reply.  For example, if someone sends me some code, I might
want to quote a section of it in the reply.  Also, my thinking was that
it was easy to trim down unwanted text in the reply; the key was getting
it properly decoded.  So, what do others think?  I could see making this
behavior configurable.


reply via email to

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