On 2006-02-16, Michael Peters <suppressed> wrote:
>
>> I added a default param to the dispatcher of
>>
>> using_dispatcher_p => 1,
>>
>> ( _p denotes a boolean ).
>
> Why 'p' for boolean, just out of curiosity?
I wanted a standard suffix for boolean names, and I found one through
the Arsdigita Community System, who got the convention from LISP. When I
just Googled it today, I found out what it really stands for:
"predicate".
Here's one mention of it:
"Of course, no romance is one sunny Perl-filled day after another. When she
delivered the code, I complained about the lack of data abstraction and told
her that she needed to reread Structure and Interpretation of Computer Programs
(Abelson and Sussman; MIT Press 1997), the textbook for freshman computer
science at MIT. I also asked her to rename helper procedures that returned
Boolean values with "_p" ("predicate") suffixes. She replied "People will laugh
at you for being an old Lisp programmer clinging pathetically to the 1960s" and
then dumped me."
From:
http://philip.greenspun.com/panda/images
I've really appreciated being able identify booleans at a glance and
recommend the practice.
However, I didn't not to use the technique in published CPAN work
because its unconventional.
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.