Learn English – Name of each item when comparing two things

programmingsingle-word-requeststerminology

I am thinking specifically of comparing two files using diff in linux or git (for those of you familiar with it), but this relates, I think, to any comparison.

I have two files. File 1 and File 2. File 1 is the older, original file – the one that is the base of comparison. File 2 is the 'draft' file – the one that will be compared against File 1 to assert differences, in this case additions or reductions in lines of text.

I want to compare them – how can I refer to each file?

My ideas:

File 1: comparer, original, base, original, current, active
File 2: comparee, draft, new

Is there an agreed upon naming convention for this scenario?

Best Answer

Just about every diff (comparison) system I've used has labelled these source and target respectively.

Note that this convention does privilege the file named first -- the source -- as the canonical, "normative", reference. For example, if file1 has a line file2 lacks, then tools following this convention will say the line has been deleted (to produce the target) rather than added (because a source isn't produced).

For the sake of having a reference, the Wikipedia article on data differencing uses the terms this way, which means they will probably be clear enough to your audience without a lot of introduction.


By the way, for a little bit of fun, the two files, collectively, can be called the "comparands" (viz "operands", "summands", etc).

Related Topic