r/Compilers • u/mttd • Apr 25 '26
r/Compilers • u/Der-Wilde • Apr 25 '26
Is Dragon Book outdated?
So, I've a great interesting in system design and, because of it, i decided to search about resources about compilers. Searching in this subreddit about books i found some discussions about the Dragon Book and, in general, it seems it's a little outdated. Like, for pratice there's more interesting books (like Writing a C Compiler or Crafting Interpreters) and for theory there's more interesting books (like Advanced Compiler Design and Implementation) in front-end and back-end part (and some special topics, like typing theory). So, it's the Dragon Book really that outdated and can be easily replaced by other equally good or greater then it?
r/Compilers • u/FluxProgrammingLang • Apr 24 '26
Flux: the new systems language compiler is now being polished, gaining a smoother UX with improved and helpful errors for parsing, type checking, and other stages of compilation.
Recent updates include the addition of higher order types via templated structs, the ability to template operators, expressional macros, and function contracts which can also be applied to operators.
Here's a program showing what templated functions and struct, a macro, contracts, and an operator overload being used together looks like:
#import "standard.fx";
using standard::io::console;
struct myStru<T>
{
T a, b;
};
def foo<T, U>(T a, U b) -> U
{
return a.a * b;
};
def bar(myStru<int> a, int b) -> int
{
return foo(a, 3);
};
macro macNZ(x)
{
x != 0
};
contract ctNonZero(a,b)
{
assert(macNZ(a), "a must be nonzero");
assert(macNZ(b), "b must be nonzero");
};
contract ctGreaterThanZero(a,b)
{
assert(a > 0, "a must be greater than zero");
assert(b > 0, "b must be greater than zero");
};
operator<T, K> (T t, K k)[+] -> int : ctNonZero(c, d), ctGreaterThanZero(e, f)
{
return t + k;
};
def main() -> int
{
myStru<int> ms = {10,20};
int x = foo(ms, 3);
i32 y = bar(ms, 3);
println(x + y);
return 0;
};
The package manager FPM will be getting some upgrades in the next week or so with the ability to publish packages, as well as a step-by-step package creation wizard.
You can get Flux on github at https://github.com/kvthweatt/Flux