/pcp

Primary LanguageC

Pcp

THIS LANGUAGE IS A WORK IN PROGRESS

Pcp is a Strongly Static Typed C like Programming Language for Computers

Compiling

$ ./build.sh
$ ls pcp
pcp

Examples

Hello, World:

extern fn printf(fmt: cstr, args: va_arg): i32;

fn main(): i32 {
    hello_world := "Hello, World";
    printf("%s\n", hello_world);
    return 0;
}
$ ./pcp hello_world.pcp
$ gcc tests/out.c
$ ./a.out
Hello, World

Language Reference

See demo.pcp

Milestones

FAQ

Why there's not a single free in the code?

$ grep -rn "free" *.c *.h
$

I am aware that this is a problem that shouldn't be underestimated. The main reason is that allocations aren't made systematically in the currently used C codebase. (Allocators) I hope self-hosted compiler will fix this issue

Where does the name come from?

It's just C++(cpp) with swapped letters