diff --git a/articles/holyc.md b/articles/holyc.md new file mode 100644 index 0000000..2ad60a3 --- /dev/null +++ b/articles/holyc.md @@ -0,0 +1,27 @@ +# HolyC +HolyC is a [JIT](jit.md) compiled, imperative [programming language](programming_language.md) created by [Terry Davis](terry_davis.md) +as the main programming language for his [TempleOS](templeos.md) operating system. Its syntax and semantics resemble the ones of [C](c.md). + +HolyC type system is quite minimal and almost for documentation purposes only, making the language almost typeless +(for example, all integer types are extended to 64 bits). Some other notable features are inline assembly support +and the ability to embed any kind of data in the source code, including images, 3D models and more +(on the source of the games included with TempleOS you can see these). + +HolyC, unlike regular C is more flexible, it is even used as the shell language in TempleOS. + +## Examples +### Hello World +```holyc +// U0 is the void type +U0 Main() +{ + // Lone string literals are a form of implicit print (and printf) + "Hello, World!\n"; +} + +// HolyC has a toplevel that allows for executable code, unlike C. +// Main here has to be called explicitly. +Main; +``` + +TODO