Timeline for What is the term used to describe a function/method that modifies the object it's called on?
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 15, 2017 at 7:28 | comment | added | Steve Barnes | @MilesRout added that functions that modify in place still return and some C/C++ examples for clarity plus results by side effects for completeness. | |
| Mar 15, 2017 at 7:26 | history | edited | Steve Barnes | CC BY-SA 3.0 | Added by value/reference and global results. |
| Mar 14, 2017 at 21:13 | comment | added | mrr | -1. Whether strings are mutable or immutable has nothing to do with the function that is operating on it. The function isn't mutable or immutable, and it isn't "returning or in-place". Functions can modify their arguments and still return. | |
| Mar 9, 2017 at 14:52 | vote | accept | Santi | ||
| Mar 8, 2017 at 20:32 | comment | added | Steve Barnes | In some languages, such as python, you can also have classes that modify themselves - while in some contexts this "monkey patching" is considered a good thing in many it is considered "self modifying code" and is forbidden. You can also have "evolutionary code" where code fragments are randomly "mutated" and/or combined then are tested and selected for the "best" performance in some manner. | |
| Mar 8, 2017 at 19:59 | comment | added | Santi | Ah, I'm familiar with these terms, though I wasn't sure if there was an actual word that describes the function itself. As in, (The reverse function is a _______ function.) That being said, this is nearly an identical response to the one that I ended up giving my friend, so I appreciate your confirmation - though I'm still wondering if there are specific terms. I'm going to let the question stay open for a bit but will certainly accept this as the answer in the event these words simply don't exist. | |
| Mar 8, 2017 at 19:50 | history | answered | Steve Barnes | CC BY-SA 3.0 |