A programming language idea: no static code, explicit caller context (Kite)
Israel Matos
nospam at nomail.com
Wed May 20 12:42:48 UTC 2026
On Friday, 1 May 2026 at 01:57:57 UTC, Marconi wrote:
> The core idea is now:
> No hidden behavior. No runtime magic. The programmer owns
> everything.
So I know a way that maybe will stick better with the idea. It is
a very old concept that existed before Rust (and a lot of us
here). But you will need to redesign your language idea I think.
**Design by Contract** is a model where you essentially unit-test
everything as you go. You can make it declarative fairly easily
and have a guaranteed no-null, no dangling pointer, no
use-after-free and segfaults, as long you follow the rules. It
really matches the slogan of responsibility and identity.
Instead of bothering in the mental gymnastics of
owner/caller/callee, errors are simply contract violations that
the compiler catch and yells at you. Memory safety is achieved by
guarantees of the programmer to the compiler (with proof).
But it's better for a compiled language. I dont recommend using
it in an interpreter. You **NEED** the compiler to check for
contracts otherwise the contract is dead weight and undefined
behavior. With enough tweaks you can make a safe programming
language with C speed.
The **Eiffel language** used it and actually proved the concept
and guaranteed correctness(that in 1985). And there are people
saying the borrow checker is something new. But its just DbC with
extra steps.
More information about the Digitalmars-d
mailing list