Misplaced Pages

Option–operand separation

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Option–operand separation" – news · newspapers · books · scholar · JSTOR (April 2022) (Learn how and when to remove this message)

Option–operand separation 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 an operation's arguments should contain only operands — understood as information necessary to its operation — and not options — understood as auxiliary information. Options are supposed to be set in separate operations.

The motivations for this are:

  1. Ease of learning: Beginners do not have to concern themselves with setting options.
  2. Wide spectrum coverage: Experts can still set options using the auxiliary operations.
  3. Evolution. Options are more likely to change than operands, so the parameter list to the operation remains more stable.

References

  1. "Option-operand separation - CSSEMediaWiki". oowisdom.csse.canterbury.ac.nz. Retrieved 2022-04-19.


Γ {\displaystyle \Gamma \!\vdash }

This programming language theory or type theory-related article is a stub. You can help Misplaced Pages by expanding it.

Categories: