CodeSmith
CodeSmith

Reputation: 2243

Is there a term for methods or functions that answer an inquiry

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

Answers (3)

ottomeister
ottomeister

Reputation: 5808

A method that returns only a true-or-false result is called a "predicate method".

Upvotes: 1

Ray Baxter
Ray Baxter

Reputation: 3200

The question is a query. There answer is the response.

Upvotes: 0

Przemysław Moskal
Przemysław Moskal

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

Related Questions