Urgent.News

What's breaking now, across thousands of outlets.

Tech

The Goose Programming Language

Goose is a memory-safe systems programming language that operates without a heap allocator, garbage collector, or lifetime annotations. In benchmarks, Goose outperforms C++ and Rust while using less memory. The language's syntax is familiar to C and Rust programmers. It features a unique data stack model, with every dynamic value residing inline on data stacks managed by the compiler.

Memory is freed automatically when its scope ends. The compiler infers roots for references, allowing stable references and eliminating the need for annotations. Goose's type and lifetime rules ensure safe memory usage. The language provides several features to optimize performance, such as constant-time references, stable references, and resizable data structures.

Goose does not have a single array type but rather a family of array types with varying resizing capabilities. Storing variable-size elements inline in an array results in sequential data, enabling efficient cache streaming. Algebraic data types are the primary form of dynamic polymorphism, with no inheritance or vtables. References in Goose are transparent, with no pointer dereferencing required.

The language offers a unique approach to dynamic polymorphism, featuring fixed mode and variable mode for ADTs. Goose also includes a special construct called return E from f, enabling functions to return values by reference from any call depth. The language's design ensures that constructed values are built at their final location, eliminating the need for out-parameters in many cases.

Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

This story

This is one outlet's version. Read the fullest account.

Read the original at aardappel.github.io →

More in Tech

Sunday Reboot: Physical logos and a monumental screw-up

In this week's Sunday Reboot, Apple Music's chunky logo takes a bath, and one heck of a security snafu. The rebrand of Apple Music - Image Credit: Apple Sunday Reboot is a weekly column covering some of the lighter stories within the Apple reality distortion field from the past seven days.

Is breach of promise to marry a shield or a relic?

Does retaining the Common Law action for breach of promise to marry serve as a shield for betrayed partners, or is it an outdated instrument for vexatious litigation? One of the most intellectually vibrant debates in modern family jurisprudence in Ghana is the survival of the Common Law action for breach of promise to marry. […]

More from Sunday 25 October →