0

When we say that one aspect of a program can be changed completely independently of another aspect, we say those things are orthogonal to one another.

I am looking for pretty much the opposite term. For example, it's a good idea in C++ if the copy-assignment operator has the same calling signature as the copy-constructor, and if they have identical effects (or are close enough not to care). Thus, one might say or write: "it is good class design in C++ to make the copy-constructor and assignment operator _______ to each other."

[EDIT] I'm asking for the computer-language concept related to the following statement: "these two functions have separate identities but similar roles, and therefore should have the same argument types, the same return types (if possible), and same (or highly similar) side-effects or behavior."

This question is not about C++, nor about object-orientation. I am looking for a more general Computer Science or mathematical concept here.

Forbin
  • 123
  • 8
  • maybe you are asking about overloading-vs-overriding https://stackoverflow.com/questions/837864/java-overloading-vs-overriding – mruanova Nov 05 '18 at 22:15
  • Thanks for asking! No, this is explicitly NOT overloading versus overriding; I'm quite familiar with the difference between the two. You're sort of asking the question in the wrong direction. I'm asking for the computer-language concept that says: "these two functions have separate identities but similar roles, and therefore should have similar argument types, similar return types, and similar side-effects or behavior. I'm trying for something like "isomorphic" or "homomorphic" to fill in the blank above, but I'm not sure either term is correct. – Forbin Nov 05 '18 at 22:41
  • PS: I almost asked this in the "English Language & Usage" forum, but I am really looking for the accepted terminology that would be used when talking about computer language definitions, compilers, and the like. Would I get better responses here, there, or on the math forum? Please advise. – Forbin Nov 05 '18 at 22:49
  • maybe you are asking about polymorphism? https://en.wikipedia.org/wiki/Polymorphism_(computer_science) – mruanova Nov 06 '18 at 00:43
  • @mruanova, please read my comments above, then re-read the question. This is not about polymorphism. It's not about C++ or object-orientation at all. It is about language theory and the terminology used within it. This is why the question carries a "terminology" tag but NOT a "C++" tag. Please don't be confused or misdirected by my usage of an example statement regarding C++. I'd prefer not to remove the C++ example from the question (it succinctly states a very real candidate usage of the term). – Forbin Nov 06 '18 at 01:20
  • I guess the technical terms is Forbinism then. – mruanova Nov 06 '18 at 01:33
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/183159/discussion-between-forbin-and-mruanova). – Forbin Nov 06 '18 at 01:34

1 Answers1

1

Do you mean two functions like this?

f: T -> R g: T -> R

For All x in T, f(x) == g(x)

And accepting also same side effects (in math there are no side effects of a function)

g and f are just equivalent functions.

mnesarco
  • 2,619
  • 23
  • 31
  • This is pretty close to what I'm looking for! However, I don't think we'd call them "equivalent functions" in Computer Science, because they might not be *exactly* equivalent. @mnesarco, I think I'm looking for a term that means "extreme similarity," or "closely related." Maybe a term related to the concept of "parallel"? (Since "orthogonal" is derived from Latin for "at a right angle to.") – Forbin Nov 06 '18 at 15:47
  • I'm giving the question another day or two to see if anyone can shed more light on the subject. If that doesn't happen, I'll be upvoting and accepting this. – Forbin Nov 09 '18 at 00:43
  • 1
    Not everything has to have a proper name. Your functions are just closely related functions. I think the case is not common or important enough to deserve a proper name. – mnesarco Nov 09 '18 at 18:28