articles/holyc.md: new article
This commit is contained in:
parent
e92e46b4dc
commit
29c9a85bc3
1 changed files with 27 additions and 0 deletions
27
articles/holyc.md
Normal file
27
articles/holyc.md
Normal file
|
@ -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
|
Loading…
Add table
Reference in a new issue