WeSearch

Ruminating about mutable value semantics

·11 min read · 0 reactions · 0 comments · 10 views
#programming#language design#software development
⚡ TL;DR · AI summary

The article discusses the challenges of designing a programming language called zest that balances efficiency and value semantics. It explores the concept of mutable value semantics, which allows mutation while preventing observable mutable references. Three approaches to enforce aliasing rules are examined: implicit copies, dynamic alias tracking, and static alias tracking, each with its own advantages and drawbacks.

Key facts
Original article
Scattered-thoughts
Read full at Scattered-thoughts →
Opening excerpt (first ~120 words) tap to expand

(This is part of a series on the design of zest. See the list of posts here.) I have two goals for zest that are in tension: Be a reasonably efficient imperative language (eg go, julia). Treat values as data (eg erlang, clojure, see the shape of data). In particular, for goal 2 I want to guarantee that deserialize(serialize(x)) == x . It's tricky to satisfy both goals, because as soon as you allow mutable references you can create circular data-structures and have to deal with questions of identity vs value.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Scattered-thoughts.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Scattered-thoughts