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/AustinVelonaut Sep 22 '26

But it's good to document the dependencies. If you have a list of includes at the top of a file, you know where all of its dependencies come from, and what it can (and cannot) do. If it's all mashed together in a single file, it's easy to accidentally create a coupling that shouldn't be there.

1

u/ApprehensivePipe1584 Sep 22 '26

They aren't really dependencies. It's my own code from my own AST node. I don't use other libraries other than LLVM which is compiler only, and libstdc++ which i don't include something and only use it once.

1

u/ApprehensivePipe1584 Sep 22 '26

Yes, there are dependencies. They're explicit conceptual dependencies, and I'm not experiencing accidental coupling as a consequence of keeping the implementation in one translation unit. I don't see how it could couple. It's one Lexer class that generates a vector of tokens, one parser class that takes tokens and generates a ast node, and one compiler that turns ast into a module. It wouldn't make sense for me to ever do any coupling. It simply has no reason to be multiple files. It's once again, not mashed together. It's a simple straightforward seperation of classes into blocks. It's not like im hodge-podging together classes.