Command–query separation
Principle that every method should either be a command that performs an action, or a query that returns data to the caller, but not both; asking a question should not change the answer
Command–query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both.
Nº Q3954590 ★★
Uncommon · Knowledge
Command–query separation
Principle that every method should either be a command that performs an action, or a query that returns data to the caller, but not both; asking a question should not change the answer
Command–query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both.
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
Command–query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language. It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, asking a question should not change the answer. More formally, methods should return a value only if they are referentially transparent and hence possess no side effects.
Text: Wikipédia, CC BY-SA 4.0. ·
Related cards
-
Quadtree
Tree data structure in which each internal node has exactly four children
Nº Q934791 ★★
Not listed
-
Query language
Computer language used to make queries into databases and information systems such as SQL or XQuery
Nº Q845739 ★
Not listed
-
C
COMMIT (SQL)
SQL statement that executes a database commit
Nº Q1115672 ★
Not listed
-
L
Landauer's principle
Physical principle that erasing one bit of information at temperature 𝑇 requires energy 𝑘𝑇ln(2)
Nº Q657486 ★★
Not listed
-
Imperative programming
Programming paradigm of directly specifying commands that affect program state
Nº Q275596 ★★★
Not listed
-
Q
Question answering
Research area in computer science
Nº Q1074173 ★
Not listed