News for hackers. Stuff that matters.
Re:Some Programming Language Ideas by zozbot234 on Thursday January 09, 2025 @07:56AM (#42644848)
> Capabilities ... They're not really compatible with C's flat memory model ... Capabilities mean having multiple types of memory

C is not really dependent on a flat memory model - instead, it models memory allocations as separate "objects" (quite reniniscent of "object orientation in hardware" which is yet another name for capabilities), and a pointer to "object" A cannot be offset to point into some distinct "object" B.

> A Truly Relational Language

This is broadly speaking how PROLOG and other logic-programming languages work. The foundational operation in such languages is a knowledge-base query, and "relations" are the unifying concept as opposed to functions with predefined inputs and outputs.

Re:Some Programming Language Ideas by pjc50 on Thursday January 09, 2025 @10:35AM (#42646650)
Possibly the nearest to applying capabilities to C is pointer authentication: https://lwn.net/Articles/718888/

(This is one of those times where the C memory model as described in the spec is very different from the mental PDP-11 that C programmers actually use to reason about)

Re:Some Programming Language Ideas by naasking on Thursday January 09, 2025 @07:07PM (#42651151)
C's file descriptors are capabilities.
Re:Some Programming Language Ideas by dwattttt on Friday January 10, 2025 @01:42AM (#42653233)
CheriBSD is definitely closer: https://www.cheribsd.org/. Or one of the other CHERI projects.