[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Can we factor out our type systems?



On Wednesday, November 26, 2003 8:19 AM, Peter J. Wasilko 
[SMTP:futurist@cloud9.net] wrote:

> Would it be feasible to 'factor out' the type system

One answer might be found here: 
http://osl.iu.edu/~tveldhui/papers/2000/tmpw00/

Abstract This paper proposes an alternate structure for C++ compilers. 
Type analysis is removed from the compiler and replaced with a type 
system library which is treated as source code by the compiler. Type 
computations are embedded in the intermediate language of the compiler, 
and partial evaluation is used to drive type analysis and template 
instantiation. By making simple changes to the behavior of the partial 
evaluator, a wide range of compilation models is achieved, each with a 
distinct tradeoff of compile time, code size, and code speed. These 
models range from pure dynamic typing -- ideal for scripting C++ -- to 
profile-directed template instantiation. This approach may solve 
several serious problems in compiling C++: it achieves separate comp  
ilation of templates, allows template code to be distributed in binary 
form by deferring template instantiation until run time, and reduces 
the code bloat associated with templates.
----
Kevin S. Millikin           Architecture Technology Corporation
Research Scientist          Specialists in Computer Architecture
(952)829-5864 x162          http://www.atcorp.com