Tech News
← Home  ·  All topics

Graphlang

1 GoKawiil brief on this topic

Student turns binary-tree assignment into a C-based functional language

A data structures exercise to evaluate arithmetic expressions like 1+1+1 using a binary tree led one developer to build a full evaluator in C. The project expanded to include closures, a garbage collector, a custom memory allocator, a REPL, and a foreign function interface, dubbed graphLang. The author generalized arithmetic operators into a single function-application abstraction rather than separate cases for Add, Sub, Mul, and Div.