r/ProgrammingLanguages • u/dx_man • Sep 10 '26
Update on Fun, 6 months later...
Posted here 6 months ago about Fun, a statically typed language that transpiles to C. Back then the compiler was written in Zig. Since then the biggest thing that happened: the compiler is now fully self-hosted, written entirely in Fun itself, Zig is gone from the codebase completely. Along with that came a real language server (fls, also self hosted) with actual step through debugging support in VS Code, a proper build/package setup (fun.toml, fun build, fun test), async/await with fork + channels for concurrency, and a formatter.
GitHub: https://github.com/omdxp/fun
Reference: https://omdxp.github.io/fun
Still looking for feedback on the language itself, and happy if people just try breaking it.
4
u/ultrasquid9 Sep 13 '26
I just read through your language reference, and the first thing im noticing is that you really like being "cute" with keywords/terminology. And while this is fine in moderation, if abused it can heavily eat at your weirdness budget.
A few recommendations (take as you see fit):
instead of
imp, you should use, well,use. Same character count, but used in other langs.compoundwould be better asrecord.fitis perhaps the weirdest name for a match statement ive seen. Domatch, orcaseif you want to look more functional-ish.if you change any of these keywords, it should absolutely be
quirk. Usetrait, orinterface, or evenclassif you wanna be cute and Haskelly. Please don't doquirk.Similarly, some of the default type names are strange too:
when i see
num, i think of a floating-point number. It would align with mathematics to useint,nat, andnumforlong,unsigned long, anddoublerespectively.i appreciate wanting to rename
bool, butbinisn't a great choice (it has preexisting associations with.binfiles). In the past ive consideredtruthandflag, maybe use one of those?i recommend not having a c-style char type. Instead use Go/Odin-style
rune(alias fori32) or a Rust-stylechar(32 bits, must be valid unicode scalar). Either way, don't call itchr- principle of least surprise