Reputation: 2243
Is there a computer science term for methods that answer a question (i.e. is_kind_of
, not_nil?
, isEmpty
, etc...
Upvotes: 0
Views: 36
Reputation: 5808
A method that returns only a true-or-false result is called a "predicate method".
Upvotes: 1
Reputation: 3609
Most methods named like these presented by you return boolean
value (value returned by these methods is logical true
or false
), so sometimes these methods are called boolean methods, but I don't think it can be called as scientific name for this type of method.
Upvotes: 0