Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Side effect (computer science)

From Simple English Wikipedia, the free encyclopedia

A part of a program with aside effect performs a noticeable action other than giving back avalue.[1] Examples include showing a picture on acomputer screen, or checking what year it is. Code with side effects can be harder to understand without any context, and the order of instructions is more important for code with side effects.[2]

Infunctional programming, programmers try to avoid side effects when they can, so it is easier to prove that a program will always do what it is supposed to. In some functional languages, likeStandard ML,Scheme, orScala, side effects are not restricted, but programmers still try to use them less.[3] InHaskell, actions with side effects must be stated explicitly—this makes it easier to tell what code does or does not have them.[4]

References

[change |change source]
  1. "programming languages - What is a "side effect?"".Software Engineering Stack Exchange. Retrieved2019-05-22.
  2. Hughes, J. (1989-02-01)."Why Functional Programming Matters".The Computer Journal.32 (2):98–107.doi:10.1093/comjnl/32.2.98.ISSN 0010-4620.
  3. Felleisen, Matthias (2018).How to design programs : an introduction to programming and computing (Second ed.). Cambridge, Massachusetts.ISBN 978-0-262-53480-2.OCLC 1033570710.{{cite book}}: CS1 maint: location missing publisher (link)
  4. Jones, Isaac (2006)."Haskell' status report".Proceedings of the 2006 ACM SIGPLAN workshop on Haskell. New York, New York, USA: ACM Press. p. 122.doi:10.1145/1159842.1159860.ISBN 1595934898.S2CID 30893956.
Thisshort article abouttechnology can be made longer. You can help Wikipedia byadding to it.
Retrieved from "https://simple.wikipedia.org/w/index.php?title=Side_effect_(computer_science)&oldid=10400534"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp