What is the name of the method whose output depends only on the input and state of the object?

I know the term "pure function", which describes a function whose output depends only on input.

Is there a similar name for a method (function of an object) whose output depends only on the input and state of the object?

+3
source share
2 answers

Bertrand Meyer , inventor of the Eiffel programming language and author of Object-Oriented Software Engineering , calls them "query methods."

+1
source

I would call it the state method

State (design-pattern), ( )

0

All Articles