Pipapo

LambdaC

Lambda C is a hypothetical programming language based on ANSI C.

Extensions to C

General

nested functions

namespace

Lambda form

Typesystem

discriminated types

each variable is internally stored with its possible type attached, might be optimized out if inference can proof that type information is unambigous.

new types

any - type gets infered, dicriminated type

none - can only hold NULL

pointer - must be initialized to a legal object

c-like pointers are of type none|type*

type hierachy

casts

defined by special function names: typeb cast_typea_to_typeb(typea)

such functions also record information
=== tuples ===
== Semantic changes ==

no automatic type conversions

tail-recursion