I built Zym because i wanted a touch more control in a scripting language. Most languages ask for a tradeoff: you get flexibility, expressiveness, and fast iteration, but you give up control over how your data moves, how your stack behaves, and how your runtime executes code. If you want that control back, the conventional answer is to drop down into a compiled, statically-typed language.
This is my attempt to sort of harness both sides together in a way without making them fight each other. It's a scripting language that stays out of your way when you want to move fast, and gets precise when you need it to. Its pretty standard syntax for what a dynamic language would expect, functions, looping, variables, other stuffs on the surface but with a touch of manual control flow.
Zym's control surface is where it splits: Explicit memory semantics — ref, slot, and val modifiers let you declare exactly how values move across function boundaries. Delimited one shot continuations as a primitive — Zym provides the building blocks to build out control flow as needed/wanted instead of relying on a set model, allows for construction of coroutines, fibers, generators, async, unconventional control flow, whatever it is thats needed. Script-directed TCO — Zym provides scope aware tco compiler directives, basically u tell compiler this return function i wanna jump, it does it no questions asked. Instruction-count preemption — the VM supports time-slicing by instruction count via a host pump and script callback, not just cooperative yields. Really handy for fair scheduling. Simple(ish) 2 way FFI - Zym was designed to be embedded. Its ffi is fairly simple to work with and provides the ergonomics of writing natives more directly like you would write a function normally rather than a lot of manual stack juggling. Allows reentry so one can move in and out of c land fairly simply.
Still early days and I am constantly working on it — would love feedback on the design, especially the memory semantics model and the continuation useage.
Playground (WASM): https://zym-lang.org/playground Docs/Site: https://zym-lang.org/docs Github: https://github.com/zym-lang/zym
anatolidp•1h ago