Functions in C5

In this paper we present the function type in C5. C5 is a superset of the C programming language. The main difference between C and C5 is that the type system of C5 supports the definition of types of dependent pairs, i.e., the type of the second member of the pair depends on the value of the first...

Full description

Saved in:
Bibliographic Details
Main Author: Cabezas, Juan José (author)
Format: report
Published: 2006
Subjects:
Online Access:http://hdl.handle.net/20.500.12008/3522
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:In this paper we present the function type in C5. C5 is a superset of the C programming language. The main difference between C and C5 is that the type system of C5 supports the definition of types of dependent pairs, i.e., the type of the second member of the pair depends on the value of the first member (which is a type). Another C5 extension is the type initialization expression which is a list of dependent pairs that can be attached to type expressions in a type declaration. These extensions provide C5 with dynamic type inspection at run time and attribute type definition. The result is a powerful framework for generic programming. The version 0.98 (September, 2006) of the C5 compiler includes the function type extending the power and expressiveness of the language. The paper introduces C5 function types, the functions C5 fapply and C5 compil, and a collection of examples