Ownership, filters and crossing handlers: flexible ownership in dynamic languages

  • Authors:
  • Erwann Wernli;Pascal Maerki;Oscar Nierstrasz

  • Affiliations:
  • University of Bern, Bern, Switzerland;University of Bern, Bern, Switzerland;University of Bern, Bern, Switzerland

  • Venue:
  • Proceedings of the 8th symposium on Dynamic languages
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Sharing mutable objects can result in broken invariants, exposure of internal details, and other subtle bugs. To prevent such issues, it is important to control accessibility and aliasing of objects. Dynamic Ownership is an effective way to do so, but its owner-as-dominator discipline is too restrictive: objects are either accessible or not. We propose in this paper to control accessibility and aliasing with more flexibility using two mechanisms, filters and crossing handlers. We demonstrate the benefits of the flexibility offered by these mechanisms, and report on the adaptation of a Smalltalk web server with our approach. We conclude that our variant of dynamic ownership is flexible enough to accommodate an existing design, while at the same time constraining it enough to highlight design anomalies.