Sciweavers

SAC
2010
ACM

General constant expressions for system programming languages

14 years 5 months ago
General constant expressions for system programming languages
Most mainstream system programming languages provide support for builtin types, and extension mechanisms through userdefined types. They also come with a notion of constant expressions whereby some expressions (such as array bounds) can be evaluated at compile time. However, they require constant expressions to be written in an impoverished language with minimal support from the type system; this is tedious and error-prone. This paper presents a framework for generalizing the notion of constant expressions in modern system programming languages. It extends compile time evaluation to functions and variables of user-defined types, thereby including formerly ad hoc notions of Read Only Memory (ROM) objects into a general and type safe framework. It allows a programmer to specify that an operation must be evaluated at compile time. Furthermore, it provides more direct support for key meta programming and generative programming techniques. The framework is formalized as an extension of u...
Gabriel Dos Reis, Bjarne Stroustrup
Added 28 May 2010
Updated 28 May 2010
Type Conference
Year 2010
Where SAC
Authors Gabriel Dos Reis, Bjarne Stroustrup
Comments (0)