Language subsetting via reflection and overloading

  • Authors:
  • John C. Lusth;Nicholas A. Kraft;James Tacey

  • Affiliations:
  • The University of Alabama;The University of Alabama;The University of Alabama

  • Venue:
  • FIE'09 Proceedings of the 39th IEEE international conference on Frontiers in education conference
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Guy L. Steele Jr., in the paper "Growing a Language," makes a strong argument for languages that can be easily extended. Just as importantly, one should be able to shrink a language as well. Two important areas wherein one might wish to restrict language features are education and coding under style guidelines. There are a number of ways to implement restrictions, many of which depend upon reparsing the source code. An alternative approach exists if the language in question has a rich enough set of features for reflection and overloading. If so, these features can be used to detect violations, both dynamically and statically. The latter methodology has the advantage that restrictions are implemented in the very language that is being restricted and do not depend upon parsing source code. This paper explores using overloading and reflection to enforce restrictions in such a way that enforcement is turned on simply by including a library. An example library is developed that is suitable for students taking an introductory programming course.