Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Who coined the term unified (or unifying) assignment operator?

A C++ wiki book refers to

... In C++0x, such an assignment operator is known as a unifying assignment operator because it eliminates the need to write two different assignment operators ...

for an assignment operator that takes it's class type by value:

String & operator = (String s) // the pass-by-value parameter serves as a temporary
{
   s.swap (*this); // Non-throwing swap
   return *this;
}

I tried googling the term, but it doesn't appear to be in widespread use.

Where does it come from?

like image 865
Martin Ba Avatar asked Jan 23 '12 07:01

Martin Ba


1 Answers

It appears to be in reference to the unification that takes place in formal type systems. The thought is if the r- and l-values can be brought to the same type (unified) by only certain, legal substitutions, then the assignment is well-formed.

Wikipedia claims the idea was first given meaningful attention (and possibly its name) by John Alan Robinson.

like image 127
phs Avatar answered Sep 30 '22 07:09

phs