by qaq · 3y ago · 0 comments
The stack I settled on:
Postgres + sqlc
templ (kindah jsx for go) + htmx
Barely have to write any js/ts now
int eval(Expr e) {
return switch (e) {
case ConstantExpr(var i) -> i;
case PlusExpr(var a, var b) -> eval(a) + eval(b);
case TimesExpr(var a, var b) -> eval(a) \* eval(b);
case NegExpr(var e) -> -eval(e);
// no default needed, Expr is sealed
}
}
But it only got that recently.