Menu

📰
0

Solod: Go can be a better C

Hacker News·Solod: Go can be a better C·2 months ago
#vG2Ha4W7
Reading 0:00
15s threshold

Solod ( So ) is a strict subset of Go that translates to regular C. Highlights Go in, C out. You write regular Go code and get readable C11 as output. Zero runtime. No garbage collection, no reference counting, no hidden allocations. Rich standard library. Use familiar types and functions ported from Go's stdlib. Native C interop. Call C from So and So from C — no CGO, no overhead. Go tooling works out of the box. Syntax highlighting, LSP, linting and "go test". So supports structs, methods, interfaces, slices, maps, multiple returns, and defer. Everything is stack-allocated by default; heap is opt-in through the standard library. There is limited support for generics, and concurrency is provided by the standard library instead of being built into the language. So is for Go developers who want systems-level control without learning a new language. And for C programmers who like Go's safety, structure, and tooling. Playground Here's some Go code in a file main.go .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More