Elektrine lite

← Feed

@zwarich@hachyderm.io

Post #2742134

2026-05-21 14:41 UTC

I'm always curious about peoples' pure C compiler codebases, so I took a look at Vercel's new Zero language (https://zerolang.ai). You can tell that someone is just fed up with the bullshit of using unions in C when you see this: struct Expr { ExprKind kind; char *text; char *resolved_type; bool moves_ownership; bool mutable_borrow; bool bool_value; bool array_repeat; Expr *left; Expr *right; ExprVec args; TypeArgVec type_args; TypeArgVec checked_type_args; FieldInitVec fields; int line; int column; }; However, they use unions like you would expect in other parts of the compiler.

Replies (1)