System and method for aggregate handling of operator overloading. A
program is created, including an aggregate comprising multiple data
elements of one or more data types, and an operator applied to the
aggregate. At least one of the data types is user-defined, and specifies
a user-defined operator function for the operator. The aggregate is
analyzed to determine one or more operator functions implementing the
operator for the data elements, and executable code invoking the one or
more operator functions for the plurality of data elements generated,
e.g., for each data element in the aggregate: if the data type of the
data element specifies an operator function for the operator, executable
code invoking the function may be generated, and if not, then if the data
element is another aggregate, the analyzing/generating is performed for
the other aggregate, and if the data element is not an aggregate, an
error may be indicated.