in reply to Re: Question Marks in Subroutine Names
in thread Question Marks in Subroutine Names
Anyone who's used Lisp knows that only Scheme heathen put question marks in predicates. Lisp (and Common Lisp) use the -P convention to mark predicates.
You could to the same in Perl (use a -<samp>p</samp> or -<samp>_p</samp> suffix on predicates). is_female would become femalep, and Lisp hackers would feel right at home. Perl hackers might be somewhat less pleased, though.
The reason you can do this sort of thing (use question marks in names) in Scheme (and could do it in Common Lisp, even though it isn't done) is that Lisps have a very simple lexical texture. In contrast, Perl has a horribly complex lexical texture to it, using every symbol on my keyboard (and overloading most of them). But any language using the C "ternary operator" ?: (and not promoting whitespace as a required separator) will not be able to have question marks in symbols.
|
|---|