Borrow-checking without type-checking / 无需类型检查的借款检查

📰 2026-04-23 12:30 更新

🔸 Borrow-checking without type-checking / 无需类型检查的借款检查

🔗 Borrow-checking without type-checking
🔥 21 points

原文:
This is a demo of a toy language with dynamic typing, inline values, stack allocation, interior pointers, single ownership, and a limited form of borrowing – less expressive than rust, but much more expressive than second-class references (eg we can express external iterators). Since there is no static typing the borrows must be checked dynamically. The interesting part of the demo is that we can do that fairly cheaply and with useful error messages. The code is here. background I’m exploring…

译文:
这是一个具有动态类型、内联值、堆栈分配、内部指针、单一所有权和有限借用形式的玩具语言的演示-比Rust更少表现力,但比二等引用更有表现力(例如,我们可以表达外部迭代器)。由于没有静态类型,因此必须动态检查借用。演示的有趣之处在于,我们可以相当便宜地做到这一点,并使用有用的错误信息 ges.代码在这里。背景我正在探索…


自动更新 · 正文抓取 · 双语翻译

Leave a Comment