r/Compilers • • Sep 21 '26

C^4 Programming Language

I've been making a programming language, C^4 for almost a year. It's got generics, concepts, OOP, inheritance and polymorphism, error handling, and is able to build projects. It has some docs and a README, and a book is in the works. Wondering if anybody could check it out?

https://github.com/Youg-Otricked/QuarticC

4 Upvotes

19 comments sorted by

View all comments

Show parent comment

1

u/EmDashNine Sep 23 '26

Y'know this whole thing gives me the impression that you are relatively early in your career and so I'm going to pull my punch, because I was green once.

If you're keeping this a personal passion project, then of course it's your choice how you want to implement it. Some of your other comments hint at a workflow that deviates somewhat from the typical developer.

If you want other folks to contribute, it would be wise to adopt --gradually -- at least some mainstream coding conventions, tooling, and practices. Hey, At least you're using git.

The whole compiler being one source file isn't really a selling point in my book, and having worked on C and C++ projects, it can be really hard to modularize things after the fact, should it prove necessary: because #include is a bad feature (hence, C++ namespaces, and C++ modules) and it's very easy to misuse them.

The sooner you can modularize this code and get to separate compilation, the better off your project will be be long term. Not saying it's easy.

1

u/ApprehensivePipe1584 Sep 23 '26

Guess that's fair. I just find spending a couple hours on that instead of the compiler feels useless because it's all in my head because it's not for me it's for others.

1

u/ApprehensivePipe1584 Sep 23 '26

Done. ls impl

compiler.cpp compiler_run.cpp errors.cpp lexer.cpp main.cpp nodes.cpp parser.cpp preproccesser.cpp runtime_embed.cpp token.cpp

╭C^4  master  11:39△ v4.4.3 5GiB/31GiB  +43.0°C 0RPM 

╰  0  ❯ ls intf

compiler.h errors.h lexer.h main.h nodes.h parser.h preproccesser.h shared_globals.h token.h

╭C^4  master  11:39△ v4.4.3 5GiB/31GiB  +43.0°C 0RPM 

╰ 0  ❯