The P programming language
Some ideas for a new programming language for Plan 9.
Desidarata:
- Straightforward compilation to C
- Reasonably interoperable with C
- Type inference
- Parametric types
- Namespaces
- Tuple types (shorthand for structs)
- Tagged unions
- Pattern matching
- Closures (compiles to the classic void * aux argument); probably a bit clumsy
Questions:
- How much of this could be implemented by a smart macro system? Having a simple meta language to implement these things could simplify the compiler.
- Extend C's syntax, supplement it with a new one or replace it altogether?