I've been working on a compiler for years now and struggling to find what direction to go, I wanted to do typescript but for C but it's been done so much. I'm debating just making my own backend, I'm tired of LLVM and shit I just want a 0.1 second compile in a C like language that's simple but ergonomic with a few modern features like generics and introspection. At the moment it fully works transpiling to C and a half done AT&T assembly output. It's not a toy either it has full type checking and a full abstract syntax tree, there are no shortcuts.
For instance here is how my language is currently doing enumerations, the plan is to have switch pattern matching over the type.
Code:
enum Event<T> {
Data(payload: T, timestamp: int),
Error(message: char*, code: int),
Empty
}
// not implemented but an example
switch (event) {
Event.Data d -> printf("%d/n", d->code),
Event.Error e -> {
panic("error %d: %s/n", e->code, e->message);
abort();
}
}
Now imagine that for the last rest of the language, cleaning up some cruft and adding a few features that are proven over the decades since C was designed, and the rest would be dead simple just like C so that writing a compiler for it or a new backend is straightforward.
The thing is I just can't trust these modern langauges, they always go retard mode 10 years in and abandon their first principles. I have to do it myself and keep the retards away.