Lesson plan
Null function
In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). Mathematically, a (computer) function f is null if and only if its execution leaves the program state s unchanged. That is, a null function is an identity function whose domain and codomain are both the state space S of the program, and for which: f(s)=s for all elements s \in S . Less rigorous definitions may also be encountered. For example, a function may take a single operand, transform it into a new data type, and return the result. While such usages bear a strong visual resemblance to identity functions, they create or alter a binary data value and thus change the program state. From a software maintainability perspective it is better to identify such "minor" alternations of state explicitly, since calling them null functions provides future maintainers of the code with no insights on their actual purposes.
Article summary
In computer science, a null function (or null operator) is a subroutine that leaves the program state unchanged. When it is part of the instruction set of a processor, it is called a NOP or NOOP (No OPeration). Mathematically, a (computer) function f is null if and only if its execution leaves the program state s unchanged. That is, a null function is an identity function whose domain and codomain are both the state space S of the program, and for which: f(s)=s for all elements s \in S . Less rigorous definitions may also be encountered. For example, a function may take a single operand, transform it into a new data type, and return the result. While such usages bear a strong visual resemblance to identity functions, they create or alter a binary data value and thus change the program state. From a software maintainability perspective it is better to identify such "minor" alternations of state explicitly, since calling them null functions provides future maintainers of the code with no insights on their actual purposes.
Key claims
No claims recorded.
Discussion questions
- Summarise the article in your own words. Which single claim would you verify first, and why?
- Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
- If two sources disagreed about one of these facts, what would you need in order to trust one over the other?
Bibliography
No sources recorded.
Key claims and bibliography are generated from the same tracked claims and sources as the article page.