Cello
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
| Designed by | Daniel Holden |
|---|---|
| Appeared in | 2015 |
| Computational class | Turing-complete |
| Reference implementation | libcello |
| Influenced by | C++, D, Objective-C |
| File extension(s) | .c |
Cello is a superset of C99 which extends the language with garbage-collected objects, interface-driven polymorphism, and reflection. While every C program is a valid Cello program, idiomatic Cello is written like a embedded domain-specific language with its own syntax for declaring structs, allocating memory, and interacting with standard libraries. It is implemented as libcello, a portable C99 library which redefines C syntax to allow C compilers like gcc, clang, cl, or tcc to compile Cello.
Examples
Hello World
#include "Cello.h"
int main(int argc, char **argv) {
println("Hello %s!", $S("World"));
return 0;
}
External links
- "A Fat Pointer Library", Holden 2015, the article which introduced the concepts underlying libcello