Hacker News new | ask | show | jobs
by convivialdingo 12 days ago
I've been toying with a better C... https://github.com/panaflexx/classyc

Started with the excellent MIR compiler, and I wrote much of the class/string/json/dict, exceptions and AI made the generics,ownership tracking, and safety checks/traps. Added some go

The memory model is mixed, I ended up using arenas for dictionaries and adding a full ownership checking / safety checking compiler stage.

It's purely for the joy of making something interesting.

1 comments

Oh wow, interesting project... I've also been working on a "better c" for a few years, and while it was originally a JIT language (using jitasm), I recently switch to MIR, but since I already had my own lexer/parser/etc stack, I ended up changing it to basically lower everything into a node_t compatible AST tree and handing that off directly to c2mir, bypassing its parser.

Maybe you're interested in collaborating? :)

https://github.com/derekbsnider/madc