Borrow-checking without type-checking

Runtime safety without types? Dev says yes, commenters say: prove it

TLDR: A dev demoed a language that enforces safety rules at runtime for dynamic code, then lets you switch to fast, compiled mode for the rest. Commenters split: static fans slam the runtime cost, while the curious debate ergonomics and even argue over what “x^ vs x*” does—memeing the “60% sound” claim.

A daring dev just dropped a toy language demo that promises “borrow-checking without type-checking”—think guardrails that prevent unsafe data use, but enforced at run time instead of compile time. It riffs on ideas from Julia and Zig: write flexible, dynamic code, then lock it down with static checks when you want speed. The twist? Borrow rules are enforced on the fly, with reference counters kept on the stack for speed, and errors that name exactly who messed up. The author even quips they’re “60% sure it’s sound,” and the internet did not let that slide.

Cue the split-screen drama. Static-typing purists came barreling in: why pay a runtime tax at all? One commenter flexed that their language does all checks at compile time—no costs, no regrets—so why bother with dynamic anything? On the other side: curious tinkerers loving the idea of dynamic glue code bridging REPLs and live reloading, then flipping to fast compiled mode when it matters. Meanwhile, a side-thread turned into a mini soap opera over what x^ vs x* actually does—will you still have your box after you poke it? Memes bloomed around the author’s “60% sound” line, with folks joking it’s the new “works on my machine.” It’s runtime rebels vs compile-time cops, and the comments are on fire.

Key Points

  • The demo language (“zest”) combines dynamic typing with limited borrowing, single ownership, and mutable value semantics.
  • Borrow rules are enforced at runtime via reference counting applied only in dynamically-typed frames.
  • Reference counts are stored on the stack, are thread-local (no atomics), and are invisible to statically-typed code.
  • The approach contrasts with Julia and Zig: zest uses explicit annotations to switch between dynamic and static modes.
  • Language semantics include independent values per variable, dropping values at block end, and a heap-allocating ‘box’ for references.

Hottest takes

"Why bothering with dynamic typing and paying runtime costs for it?" — Panzerschrek
"It seems like either one evaluates the contents of the `box`" — drabbiticus
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.