Solod: Go can be a better C
3 days ago
- #Go-subset
- #C-translation
- #programming-languages
- Solod (So) is a strict subset of Go that translates to regular C, supporting structs, methods, interfaces, slices, maps, multiple returns, and defer.
- Everything is stack-allocated by default, with heap allocation as an opt-in via the standard library. There is limited generics support, and concurrency is provided by the standard library instead of being built-in.
- So targets Go developers seeking systems-level control without learning a new language and C programmers who appreciate Go's safety, structure, and tooling.
- The example code demonstrates a simple Person struct with a method, and So features like time handling. Users can run or translate Go code to C through the provided interface.
- As of July 2026, So is in active development with release 0.2 adding networking, WebAssembly, and freestanding mode. Version 0.3 is planned for concurrency support.