Extending compound assignments for C++

  • Authors:
  • T. B. Dinesh

  • Affiliations:
  • -

  • Venue:
  • ACM SIGPLAN OOPS Messenger
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

Compound assignments have been created with efficiency, for handling a subset of things that simple assignments can do. This gain in efficiency is due to the interpretation of the compound assignment as a message that modifies self (“this”). However, C++ does not extend the same interpretation of compound assignments to user defined types. In this paper, we illustrate how the notion of compound assignments is natural in C++, how it can be implemented and indicate that the resulting gain in efficiency is akin to the gain in efficiency obtained by optimizing C compilers that translate complex expressions to simple ones that use compound assignments.