Escape from the Maze of Twisty Classes
- Sean McDirmid
SPLASH Onward! |
Published by ACM SIGPLAN
Programmers demand more extensive class libraries so they can reuse more code and write less of their own. However, these libraries are often so large that programmers get lost in deep hierarchies of classes and their members that are very broad in number. Yet language designers continue to focus on computation, leaving tools to solve library exploration problems without much help from the language.
This paper applies language design to improve IDE code completion that enables in-situ library exploration. Inference tackles depth by listing completions as long as the program can be “fixed” to support their selection; e.g. “pressed” can be listed as a widget completion since a widget can be a button. Influence mitigates breadth by leveraging types as completion selection models; e.g. a pressed event is more likely to be used on a button than a mouse event. We apply this design to YinYang, a language for programming simulations on tablets using touch-based menus.
Permission to make digital or hard copies of all or part of this work for personal orclassroom use is granted without fee provided that copies are not made or distributedfor proï¬t or commercial advantage and that copies bear this notice and the full citationon the ï¬rst page. To copy otherwise, to republish, to post on servers or to redistributeto lists, requires prior speciï¬c permission and/or a fee.Onward! 2012, October 19-26, 2012, Tucson, Arizona, USA.Copyright c 2012 ACM 978-1-4503-1562-3/12/10. . . $10.00