Talk:Semipredicate problem

From Wikipedia, the free encyclopedia

What is a semipredicate? --Abdull 08:35, 9 April 2007 (UTC)

In Lisp, a semipredicate is a function that can return either "false" (NIL in Common Lisp) or some useful value, where "false" means that the value is missing or there was an error [1]. So a semipredicate function can have the "semipredicate problem" if "false" is in the domain of useful values it can return (but might not if "false" is not in that domain).
However, the term "semipredicate problem" seems to be a Perl-ism, judging by Google; I'd never heard of it by this name before. A more general description of the cause of this problem is "in-band error signalling". --DavidHopwood 22:30, 15 September 2007 (UTC)
Maybe coined by Mark-Jason Dominus? There is a chapter on it in his book Higher-Order Perl: Transforming Programs with Programs (Morgan Kaufmann, March 2005), and earlier references by him back to 2002 [2]. I don't know whether he coined this term or just popularized it, though. --DavidHopwood 22:47, 15 September 2007 (UTC)
It isn't a Perlism; it's mentioned in Peter Norvig's Paradigms of Artificial Intelligence Programming. MJD's (functional programming in-) Perl book certainly helped popularize it. Gaal (talk) 14:14, 22 December 2007 (UTC)