I thought I was building a C replacement. I was wrong

birdculture 17 points 1 comment September 29, 2026
c3-lang.org · View on Hacker News

Discussion Highlights (1 comments)

Panzerschrek

> methods first I agree, that sometimes doing things OOP-style with methods isn't the right choice and using plain structs and free functions is a better way of doing things. But there are cases where using methods is inevitable - when internals must be hidden in order to prevent incorrect usage. Also it's needed if one needs runtime polymorphism, in such cases (in C++) inheritance and virtual methods come to rescue. Doing so in C way (with void pointers and structs containing function pointers) is less ergonomic and bug-prone.

Semantic search powered by Rivestack pgvector
7,945 stories · 74,007 chunks indexed