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 don't think there are any formal names for the various versions you list. First of all, please note that output in a programming context most often refers to printing something on a screen or to...
Answer
#2: Post edited
- I don't think there are any formal names for the various versions you list.
- First of all, please note that _output_ in a programming context most often refers to printing something on a screen or to a file, or updating graphics. "Function output" is not a common programming term - almost every language instead terms such function _return value_ or perhaps "result".
- That being said, some semi-formal, widely accepted "language-agnostic" terms do exist:
- - _Procedure_ or _subroutine_ often refers to functions which do not return anything. I think this might originate from Pascal and/or Ada. [C family languages](https://en.wikipedia.org/wiki/List_of_C-family_programming_languages) tend _not_ to use either of these terms but call everything functions.
- - _Re-entrant_ refers to a function which can be safely used in a multi-thread program, because it has no side effects.
- - _Thread-safe_ refers to a function which can be safely used in a mult-thread program. It has side effects, but those are guarded with semaphore/mutex or similar.
- - _Member function_ or _method_ is something that interacts with a given object. It may have side effects, including updating the object data.
- Many OO languages also support "read-only" member functions, which are guaranteed not to modify the current object (but may contain other side effects). _Immutable objects_ is another common term used for objects that are never modified after creation - and so a function taking an immutable object as parameter cannot/will not modify that object (but may contain other side effects).
- I don't think there are any formal names for the various versions you list.
- First of all, please note that _output_ in a programming context most often refers to printing something on a screen or to a file, or updating graphics. "Function output" is not a common programming term - almost every language instead terms such function _return value_ or perhaps "result".
- That being said, some semi-formal, widely accepted "language-agnostic" terms do exist:
- - _Procedure_ or _subroutine_ often refers to functions which do not return anything. I think this might originate from Pascal and/or Ada. [C family languages](https://en.wikipedia.org/wiki/List_of_C-family_programming_languages) tend _not_ to use either of these terms but call everything functions.
- - _Re-entrant_ refers to a function which can be safely used in a multi-thread program, because it has no side effects.
- - _Thread-safe_ refers to a function which can be safely used in a mult-thread program. It has side effects, but those are guarded with semaphore/mutex or similar.
- - _No-op_ is often used informally to describe functions which do not perform anything and have no side effects. Likely originating from the common assembler `nop` instruction (no operation, do nothing).
- - _Member function_ or _method_ is something that interacts with a given object. It may have side effects, including updating the object data.
- Many OO languages also support "read-only" member functions, which are guaranteed not to modify the current object (but may contain other side effects). _Immutable objects_ is another common term used for objects that are never modified after creation - and so a function taking an immutable object as parameter cannot/will not modify that object (but may contain other side effects).
#1: Initial revision
I don't think there are any formal names for the various versions you list. First of all, please note that _output_ in a programming context most often refers to printing something on a screen or to a file, or updating graphics. "Function output" is not a common programming term - almost every language instead terms such function _return value_ or perhaps "result". That being said, some semi-formal, widely accepted "language-agnostic" terms do exist: - _Procedure_ or _subroutine_ often refers to functions which do not return anything. I think this might originate from Pascal and/or Ada. [C family languages](https://en.wikipedia.org/wiki/List_of_C-family_programming_languages) tend _not_ to use either of these terms but call everything functions. - _Re-entrant_ refers to a function which can be safely used in a multi-thread program, because it has no side effects. - _Thread-safe_ refers to a function which can be safely used in a mult-thread program. It has side effects, but those are guarded with semaphore/mutex or similar. - _Member function_ or _method_ is something that interacts with a given object. It may have side effects, including updating the object data. Many OO languages also support "read-only" member functions, which are guaranteed not to modify the current object (but may contain other side effects). _Immutable objects_ is another common term used for objects that are never modified after creation - and so a function taking an immutable object as parameter cannot/will not modify that object (but may contain other side effects).