Goose is a memory-safe systems programming language built around a single radical idea: there is no heap. Every dynamic value lives inline on compiler-managed data stacks; growth is a pointer bump and scope exit is the only free. That design removes allocators, garbage collection, reference counting and destructors, yielding dramatic resource and speed wins on benchmarks: across sixteen tests Goose reports 3.3× idiomatic C++ speed, 1.16× hand-optimized C++, and 1.12× the best safe Rust while using less memory (summary and full results available). Nothing ever moves, so references into growing arrays remain valid, relative links can be stored in 1-4 byte offsets, and values are constructed directly in their final destination. Goose compiles to a single C file (TinyCC backend included) and interoperates with plain C.
The language enforces safety without lifetime annotations by inferring a static root for every reference and rejecting only outliving the owner. Its array and string family is “flat all the way down”: variable-size fields sit inline, arrays can be fixed, frozen, capacity-inline, grow-only, or builders, and a record with variable parts can be a single contiguous block (example: an Order becomes 29 bytes with zero allocations). Algebraic data types support fixed and variable storage modes so a variant can occupy exactly its payload size. Other notable features include zero-overhead generics via untyped parameters, statically checked multi-frame error returns, and threads that share nothing (workers are separate programs passing flat values by memcpy).
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.