What is Generic Programming?
Generic Programming is the art of writing highly reusable code that is also highly efficient.
Why Clay?
Clay is concise.
If you've written generic programs with C++ templates, you know how verbose it is. This is because type names are longer in generic code. Clay solves this problem elegantly by providing whole program type propagation. Generic programming, when combined with whole program type propagation lets you write high-level code rivaling scripting languages in conciseness.
Clay is fast.
Efficient type-specialized code is generated during compilation. This type-specialized code is low-level and is equivalent to C in performance. Clay uses LLVM to optimize the generated low-level code.
Clay is a systems programming language.
Clay has the same memory footprint and runtime overhead as C. It is suitable for writing garbage collectors, embedded systems, database servers, games etc.
Clay design philosophy.
Efficient, concise, generic - Pick any three.
Current Status
A fully functioning compiler is available. Clay works on Mac OS, Linux, and Windows. Since Clay is still in its early stages of development, it should be considered a technology preview.
Sample code
Here are some programs from the 'test' directory:
Download
Grab the source here. Instructions for building Clay are in the README.txt file.
Binaries are currently available for the following platforms. If you would like to have binaries for any other platform, do drop me a line.
| Platform | Download |
|---|---|
| MacOS X x86 64-bit | clay-macosx64-2010.07.29.zip |
| Windows x86 32-bit | clay-win32-2010.07.29.zip |
| Ubuntu 10.04 x86 32-bit | clay-linux32-2010.07.29.zip |
| Ubuntu 10.04 x86 64-bit | clay-linux64-2010.06.24.zip |
Benchmarks and Tutorial
Coming soon...