The compiler for the QuarticC (C⁴) programming language. - Youg-Otricked/QuarticC
2 comments
YougOtricked8 days ago
C^4 is a statically typed, systems programming language fixated on clean code and giving power to the user. It compiles to LLVM IR, and will eventually have a to-x86-64 compiler. If you think you should be able to do it, you can. It still has crashes in certain error cases, but to my knowledge no correct code compiles with errors.
I would like to get some people to try it out and get some opinions on the docs, README, and syntax. (docs are linked in the README).
It has C interop and inline asm.
Here's an example code snippet:
```
namespace Exported {
#include<Vector, std> // std is a builtin-
alias for ~/.qc/lib/stdlib.qc
}
int main(int argc, char *argv) {
Vector::Vec<string> args = Vector::Vec<string>();
for (int i = 0; i < argc; i++) {
args.push(argv[i]);
}
foreach (string arg in args) {
if (arg == "asm") `inline(R"(
mov rax, 1
mov rdi, 1
mov rsi, 14
mov rdx, $0r
syscall
)", "Hello, World!", "~{rax,rdi,rsi,rdx,rcx,r11,memory}");
}
return 0;
}YougOtricked8 days ago
It also has full OOP, unions, structs, inheritance, polymorphism, concepts (As in C++ concepts, different syntax), a standard library (small till compiler is feature complete, but not tiny), and a lot more.
Read the full thread on Hacker News →
Related stories
- Make the Raku programming language familiar to C++ programmerssoftware.gellyfish.co.ukLobsters · 8 points · over 4 years ago
- Lobsters · 10 points · 6 months ago
- Flix - The Elegance of Functional Programming with the Conciseness of Logic Programmingflix.github.ioLobsters · 11 points · about 10 years ago
- Self Programming Language Release “Mandarin” 2017.1blog.selflanguage.orgLobsters · 11 points · over 9 years ago
- Is your programming language unreasonable?fsharpforfunandprofit.comLobsters · 9 points · over 11 years ago
- Lobsters · 1 points · over 7 years ago