{
  "id": 9374503,
  "title": "Do not let your type system reason about aliasing in your programming language",
  "url": "https://urgent.news/2026/09/23/do-not-let-your-type-system-reason-about-aliasing-in-your-programming",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-23T14:07:23.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://futhark-lang.org/blog/2026-09-22-aliasing.html"
  },
  "original_language": "en",
  "account": "The source material discusses the challenges of implementing in-place updates in a programming language's type system. In-place updates allow expressions like A[i] := v to update the element at index i in array A without creating a new array, instead performing a destructive write in-place. The type checker enforces that the old value of A is never used after the update, treating A as consumed.\n\nTo ensure that updates are performed correctly at runtime, the type checker must reason about identity in the type checker, tracking aliases of variables that may share memory with the consumed variable. The code associates each variable with an alias set, which is a set of variables that potentially share memory with the original variable.\n\nThe source then explains how this alias tracking is implemented for various language constructs like expressions, array literals, conditional expressions, and function calls. For example, after a binding like let B = A, B and A are considered aliases of each other, and this is reflected in their alias sets. Conditional expressions are tracked conservatively, considering both branches as aliases of the original variables.\n\nThe source also discusses the complexity introduced by the interaction of in-place updates with other language features, and the desire to keep the design simple and local, avoiding costly whole-program analysis. Functions are also affected, as a consuming function must indicate that its argument is consumed when called. The type system distinguishes between consumed and observed arguments using an asterisk notation for function parameters and return types.\n\nOverall, the source highlights the difficulty of implementing in-place updates in a way that maintains soundness (safety) while keeping the type system simple and local, and the various trade-offs and complexities that arise in doing so.",
  "summary": null,
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}