10
$\begingroup$

For functions or computations we have terms like:

  • Deterministic – Determinism
  • Pure – Purity

Now what is the correct corresponding noun for side-effect-free?

"Side-effect freeness"? "Side-effect freedom"? "Non-side-effective"?

$\endgroup$
  • 4
    $\begingroup$ Should this not be on English Language & Usage? ;) In any case, could you give your usage context? I agree that using a proper noun of this kind does not feel right. (As a native German I sympathize; but we do have to force ourselves not to translate such monsters literally. They are almost always bad in German, too, if possible.) $\endgroup$ – Raphael Nov 5 '13 at 12:59
  • 1
    $\begingroup$ Is side-effect-free different from pure? $\endgroup$ – Andrej Bauer Nov 5 '13 at 14:14
  • $\begingroup$ @Raphael I also thought of asking the question there, but as I am asking about the correct corresponding noun in a programming context, I think that computer scientist may give me better answers. $\endgroup$ – rolve Nov 5 '13 at 14:30
  • 3
    $\begingroup$ @AndrejBauer I think that pure is both side-effect-free and deterministic, while side-effect-free may still be nondeterministic. $\endgroup$ – rolve Nov 5 '13 at 14:31
  • $\begingroup$ @Raphael There is actually no very specific context. I am currently thinking about how deterministic, side-effect-free and pure functions relate to each other. And to think about these concepts without having a name for each of them makes me uneasy. :D $\endgroup$ – rolve Nov 5 '13 at 14:36
8
$\begingroup$

A good rule of thumb for grammatical questions is, if it's so complicated that you need to ask, it's better to just rephrase the sentence. For example, "Side-effect-freedom of the function guarantees X" is more simply and elegantly written, "Because the function is side-effect free, X is guaranteed" or even, "The function has no side-effects, so X is guaranteed."

Having said that, keywords for articles are expected to be noun phrases so that would be a place to use "side-effect freedom".

(By the way, "non-side-effective" is an adjective.)

$\endgroup$
  • $\begingroup$ (By the way, "non-side-effective" is an adjective.) Good catch... And thanks for the answer. But unfortunately, I don't need the word for just a sentence. $\endgroup$ – rolve Nov 5 '13 at 11:44
8
$\begingroup$

Depending on the context, "absence of side-effects" may be a more readable term.

$\endgroup$
7
$\begingroup$

The word is nullipotence, the noun form of nullipotent. From the first definition on Wiktionary:

(mathematics, computing) Describing an action which has no side effect. Queries are typically nullipotent: they return useful data, but do not change the data structure queried. Contrast with idempotent.

(emphasis mine)

http://en.wiktionary.org/wiki/nullipotent

$\endgroup$
  • $\begingroup$ Wow, I have never heard of this term before. It does not seem to be commonly used (Google reports 16'300 results for "nullipotent" and 1'580 results for "nullipotence" and my browser spell checker knows neither of them). But I might just used it for the sake of it! Thanks. $\endgroup$ – rolve Nov 6 '13 at 6:45
  • 3
    $\begingroup$ I'm a domain expert and I don't think I've ever seen that term used. It's not a bad word, but it definitely needs to be defined before use. $\endgroup$ – Gilles 'SO- stop being evil' Nov 6 '13 at 9:54
  • 3
    $\begingroup$ This helped me to realize that there exists a difference between nullpotent and nilpotent. $\endgroup$ – Val Nov 6 '13 at 11:33
  • 1
    $\begingroup$ @Val, yeah, I thought they meant the same thing until I studied abstract algebra. If I were feeling particularly cruel, I would explain it by saying that something nullpotent affects nothing, whereas something nilpotent effects nothing. :P $\endgroup$ – Matthew Piziak Nov 6 '13 at 15:49
3
$\begingroup$

I learned this concept as referential transparency.

However, there is some debate as to whether or not this is actually a meaningful term, so if you're going to use it in a paper, you should define it first.

$\endgroup$
  • 2
    $\begingroup$ Referential transparency is not the same thing as absence of side effects. You can have a purely functional language in which macros bring about unwanted name capture left and right, thereby destroying referential transparency. $\endgroup$ – Kaz Nov 5 '13 at 22:15
  • $\begingroup$ @Kaz Speaking of referential, do you have any references for that macro story? $\endgroup$ – rolve Nov 6 '13 at 6:52
  • $\begingroup$ @rolve I could be taking a too parochial view. For a contrasting one, see the Tunes project's definition of referential transparency which does have connection to freedom from side effects: tunes.org/wiki/referential_20transparency_20and_20state.html $\endgroup$ – Kaz Nov 6 '13 at 6:56
  • $\begingroup$ @rolve I was thinking of referential transparency in the context of evaluation: code transformations can relocate expressions, yet the references in those expressions work properly no matter what. E.g. hygienic macros systems are said to be referentially transparent. There is nothing "accidentally opaque" between a reference and what it refers to, like a symbol of the same name inserted by the compiler in some invisible code. $\endgroup$ – Kaz Nov 6 '13 at 6:59
  • $\begingroup$ @Kaz: As I mentioned in my answer, there are several conflicting definitions of 'referential transparency' $\endgroup$ – BlueRaja - Danny Pflughoeft Nov 6 '13 at 7:16
2
$\begingroup$

Side-effect freedom, is what I would use.

$\endgroup$
  • $\begingroup$ Unfortunately, this has an interpretation that side effects have freedom, not that the situation is free from side effects; that is unambiguously expressed by "freedom from side effects". $\endgroup$ – Kaz Nov 5 '13 at 22:30
  • 3
    $\begingroup$ Certainly. Even though that is true, I've seen it used in practice. $\endgroup$ – Dave Clarke Nov 6 '13 at 9:58
2
$\begingroup$

If running the function multiple times has the same net effect on the system as running it once, the function is idempotent and has idempotency. Don't know if that's what you're looking for.

$\endgroup$
  • 1
    $\begingroup$ Thanks, that's another concept I will have to think about. Maybe one could say that idempotent is weaker form of side-effect-free. But it is not exactly what I was looking for. (And in any case it's not a noun.;-)) $\endgroup$ – rolve Nov 5 '13 at 14:53
  • 1
    $\begingroup$ Good point - the noun form is idempotency. $\endgroup$ – Tin Man Nov 5 '13 at 15:34
  • 3
    $\begingroup$ exemple of idempotent function: chmod : you can re-run it several times, it won't do more than the first time (unless files changed in between...). There are many others. It is not exactly "side effect free" however as it does change things and could prevent other programs to do something too, once the permission changes. $\endgroup$ – Olivier Dulac Nov 5 '13 at 17:55
  • 1
    $\begingroup$ The term is probably the most important in web programming - if you're modifying a database (adding new users, for instance) and you're dealing with the unreliability of a network, you need to make sure that duplicated messages received by the server don't cause unexpected issues. $\endgroup$ – Tin Man Nov 5 '13 at 19:24
  • 2
    $\begingroup$ Idempotent functions are definitely not side-effect free. N invocations of an idempotent function has the same overall side effect as 1 invocation. A function with no effect is a special case of idempotency. $\endgroup$ – Kaz Nov 5 '13 at 22:14
1
$\begingroup$

You almost got it with "side effect freedom". The problem is that this possibly means that the side effects are free (as in "freedom of side effects"). To be clear, you need "freedom from side effects". And note how "free of" does not pair with "freedom of"; both "free of something" and "free from something" go to "freedom from something".

In general, you will find that compound noun phrases whose head is "freedom" are instinctively eschewed by native speakers of English, even though they are grammatical. For instance "freedom of speech" and "freedom from oppression" are not called "speech freedom" and "oppression freedom". The meaning could be worked out from context ("speech freedom" probably isn't "freedom from speech", and "oppression freedom" isn't "freedom to oppress") but the forms are simply not euphonic. Even if that is merely from disuse, it is the way it is.

Academic papers in CS are also written for a world audience which includes non-native English speakers. If you're able, then write like a native English speaker.

$\endgroup$
  • $\begingroup$ Thanks for the explanations, they seem reasonable to me. Would it make any difference if I spelled the word with dashes, as I did in the original post: "side-effect-freedom"? Or would that be just wrong? $\endgroup$ – rolve Nov 6 '13 at 6:48
  • $\begingroup$ The hyphens do not change the meaning. About hyphens, see here. The section on Compound Nouns applies. $\endgroup$ – Kaz Nov 6 '13 at 6:52
  • 1
    $\begingroup$ "Side-effect freedom" is fine and widely used. There is no practical ambiguity because, of the two possible parsings, "freedom from side-effects" is a perfectly sensible concept that is often discussed, while "freedom of side-effects" is nonsense that nobody ever talks about. If a phrase has an obvious meaning, people won't go looking for other meanings: they'll just get on with reading the rest of the sentence. $\endgroup$ – David Richerby Nov 6 '13 at 12:11
  • 1
    $\begingroup$ @DavidRicherby Thanks for the comment, I was thinking the same thing. It's still nice to understand that there is a theoretical ambiguity though. $\endgroup$ – rolve Nov 6 '13 at 12:22
  • 1
    $\begingroup$ "Side-effect freedom" is the standard, idiomatic phrase. There is only one thing it could reasonably mean; ergo, that is what it means. Grammar exists to serve us, not to enslave us. $\endgroup$ – David Richerby Nov 6 '13 at 23:21
-1
$\begingroup$

You probably want "orthogonality". It seems to fit your definition exactly.

$\endgroup$
  • $\begingroup$ Thanks for the answer. However, I think the word orthogonal is only used for concepts and not for computations or functions. It is, however, true that two side-effect-free functions could be seen as orthogonal, since they do not interfere with each other. $\endgroup$ – rolve Nov 6 '13 at 9:09
  • $\begingroup$ My understanding is that "orthogonality" was also used for functions (I think pure functions were called "orthogonal" sometimes). But I might be wrong, since "orthogonal" feels like it needs a second thing, i.e. something orthogonal to something else, so indeed it can't be that general after all... $\endgroup$ – CamilB Nov 6 '13 at 10:23
  • $\begingroup$ But why do you search for a separate term for functions without side-effects? "Pure function" means exactly that: both deterministic and with no side-effects (says Wikipedia). $\endgroup$ – CamilB Nov 6 '13 at 10:24
  • $\begingroup$ That's exactly the point: I want to reason about functions that are side-effect-free but not necessarily deterministic. Pure is already "too much". $\endgroup$ – rolve Nov 6 '13 at 10:35
  • $\begingroup$ I understand now. It would be an interesting exercise to search for non-deterministic side-effect-free functions. I can't think of any, except an atom, modeled with QM :) May I recommend thesaurus.com? Maybe there's an antonym of a noun related to side-effect out there. Also, maybe the word you need is a word that must be added to English from another language. I'll leave you alone now :) $\endgroup$ – CamilB Nov 6 '13 at 11:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.