|
ABSTRACT
Coercion can greatly improve the readability of programs, especially in arithmetic expressions. However, coercion interacts with other features of programming languages, particularly subtyping and overloaded functions and operators, in ways that can produce surprising behavior. We study examples of such surprising behavior in existing languages. This study informs the design of the coercion mechanism of Fortress, an object-oriented language with multiple dynamic dispatch, multiple inheritance and user-defined coercion. We describe this design and show how its restrictions on overloaded declarations prevent ambiguous calls due to coercion.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Fortran 90, ISO/IEC 1539: 1991 (E), ANSI X3.198-1992, May 1991.
|
| |
2
|
C++, ISO/IEC 14882: 1998, 1998.
|
| |
3
|
Enterprise PL/I for z/OS: Enterprise PL/I Language Reference, Seventh Edition, November 2005.
|
| |
4
|
C# Language Specification, 4th Edition, ECMA-334, June 2006.
|
| |
5
|
Eric Allen, David Chase, Joe Hallett, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy L. Steele, Jr., and Sam Tobin-Hochstadt. The Fortress Language Specification Version 1.0 beta, March 2007.
|
 |
6
|
Eric Allen , J. J. Hallett , Victor Luchangco , Sukyoung Ryu , Guy L. Steele, Jr., Modular multiple dispatch with multiple inheritance, Proceedings of the 2007 ACM symposium on Applied computing, March 11-15, 2007, Seoul, Korea
[doi> 10.1145/1244002.1244245]
|
 |
7
|
|
| |
8
|
|
| |
9
|
|
| |
10
|
Karl E. Peterson. Coercion aversion. Visual Basic Programmer's Journal, pages 148--154, November 1995.
|
| |
11
|
|
| |
12
|
Paul Vick. The Microsoft Visual Basic Language Specification, Version 8.0 (Beta 2), 2005.
|
|