1

I tried to Google this but no luck so far. I was wondering if there was proper words to describe the comparison of 2 subjects?

  1. The first subject would be the object being compared in relation to the other (the baseline).
  2. The second subject would be the object compared to the first one.

So you could say, subject 1 is taller than subject 2 for example.

Do we say subject 1 is the subject of comparison and subject 2 is the comparee? I saw some scientific article using the word comparee but it doesn't sound proper to me.


Given the topic, I am updating this question with more context so that it is less confusing. It looks like comparison subjects can have quite a few different names depending on their context. Here is the context I'm looking for (watch out for the pseudocode - yes I'm know I'm not on Stackoverflow...):

function isGreater(subject1, subject2) { if (subject1 > subject2) { return true; } return false; }

More precisely, I'm looking for the left/right words (subject1/subject2) which would be the most semantically correct. We're also presuming that the order does not change and that is example is way much simpler than what I'm trying to solve (which is why semantic variable names make sense).

Please help!

  • Thanks, actually I'm looking for a usage in computer science, mostly for for sort algorithms where you compare the first subject with the second... I found rather undescriptive that most libraries are using object1 and object2 as variables... I'm trying to see if I can find something better – Nicolas Bouvrette Jun 12 '16 at 22:14
  • Good thing you mentioned computer science because I was going to suggest litigants or adversaries. : ) – Stan Jun 12 '16 at 22:24
  • @JEL I believe the key is what things are compared to or with. It is the "first out" of a sort. – Stan Jun 12 '16 at 22:27
  • 1
    For comparison (two or three way, pair-wise or binary) sorts, I prefer to name the objects simply left and right, since the comparative test is if left < right ... else if left = right ... else if left > right ... and in each case, the left side is compared (with <, =, >) to the right side. – torek Jun 12 '16 at 22:33
  • 1
    "Comparand" is the most common term in math and computer science for the two operands in a comparison operation. There isn't, to my knowledge, a well-defined terminology for the left versus right comparand, however. – Hot Licks Jun 12 '16 at 22:50
0

Could you compare "choices" or "samples" from within a database of otherwise unknown, unsorted, and unclassified elements.

When working with comparable items, I have also used the term "sorts." The term came into use when referring to a disorganized pile of printer's type that had yet to be disbursed into an organized type case for use. Each sort had to be identified (compared and matched with the others in specific sections of the case).

  • I think I will edit the question to make it more clear, the idea is to distinguish both the reference subject and the other subject used to compare (left/right) - I'm looking for 2 terms. – Nicolas Bouvrette Jun 12 '16 at 22:36
0

After several interesting conversation in the post's comments, I got creative and found names for my use case which make most sense for me. While I understand that given the nature of the question it looks almost like at this point this is more of a personal preference than a black and white answer, I will share my thought process.

Based on my use case, concerns comparing two variables from which one is the left and the other is the right in a greater than (>) comparison, I could have picked leftElement and rightElement. While they make sense from a comparison perspective, I find that if looked at in a big block of code, they would be hard to understand.

I preferred to pick referenceElement and comparedElement. The idea behind that is that the first one is the one used as reference for the comparison and the second one is the one we use to compare. While I also understand that there could be context calling this function with a variable named reference which would be used in the right side, I think that local context takes precedence on these situation for better readability. Any good developer should know the different between local variables and their scopes.

Also to give more context, the objects which I use to compare in this function are HTML element, hence the element but I could have picked something else in a different context.

  • Being the OP, and seeing no one has posted a new answer in over a year, maybe you should accept this answer. That way it stops the question being bumped to the front page every month. – Mari-Lou A Mar 5 '18 at 16:42

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.