Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I know that 1 is sometimes called a pure function - although apparently a pure function must also not vary when the input is constant. By negation, the other kind are called impure functions, alth...
Answer
#2: Post edited
- I know that 1 is sometimes called a *pure function* - although [apparently](https://en.wikipedia.org/wiki/Pure_function) a pure function must also not vary when the input is constant.
- By negation, the other kind are called *impure functions*, although this seems to me biased towards the idea that side effects are bad.
- I've seen [*procedure*](https://stackoverflow.com/q/721090/21703684) used for 4, but it seems to be used inconsistently and sometimes gets conflated with 3 and even 2 depending on the language.
5 is sometimes called a *trivial* or *dummy* function.
- I know that 1 is sometimes called a *pure function* - although [apparently](https://en.wikipedia.org/wiki/Pure_function) a pure function must also not vary when the input is constant.
- By negation, the other kind are called *impure functions*, although this seems to me biased towards the idea that side effects are bad.
- I've seen [*procedure*](https://stackoverflow.com/q/721090/21703684) used for 4, but it seems to be used inconsistently and sometimes gets conflated with 3 and even 2 depending on the language.
- 5 is sometimes called a *trivial* or *dummy* function. *Null function* or *no-op* are also used.
#1: Initial revision
I know that 1 is sometimes called a *pure function* - although [apparently](https://en.wikipedia.org/wiki/Pure_function) a pure function must also not vary when the input is constant. By negation, the other kind are called *impure functions*, although this seems to me biased towards the idea that side effects are bad. I've seen [*procedure*](https://stackoverflow.com/q/721090/21703684) used for 4, but it seems to be used inconsistently and sometimes gets conflated with 3 and even 2 depending on the language. 5 is sometimes called a *trivial* or *dummy* function.