Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
BorrowScriptInterpreter
Discontinued A compiler and toolchain for the Stream programming language [Moved to: https://github.com/Isaac-Leonard/Stream]
-
Kind
Discontinued A next-gen functional language [Moved to: https://github.com/Kindelia/Kind2] (by Kindelia)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
I have been starting to look through the polonius code, and have read as much as I can about how the borrow checker works, and I understand how it works at a high level. But I don't understand the algorithm it uses internally (the specific rustc algorithm, the polonius algorithm, or the theoretical/hypothetical pseudocode algorithm). It will take some time to grok polonius.
I really like the idea of ownership and ownership types / affine types, which it seems like the borrow checker implements (for garbage collection features and the general type theory benefits you get). Though I am no type theory expert, just been browsing around trying to figure out how the ideal compiler would work, finding things like lobster lang and kind lang along the way.
I asked how to implement a "borrow checker" in JavaScript in my initial attempts (I've learned a decent amount since), which led me to randomly finding BorrowScript that seems to have another implementation I think, so going to be taking a deeper look there for inspiration as well. But if one could explain the steps of the algorithm, and how it integrates/relates with the type inference process, that would be of great use. Not for learning how to use Rust, but to learn how this aspect of its compiler works.
I asked how to implement a "borrow checker" in JavaScript in my initial attempts (I've learned a decent amount since), which led me to randomly finding BorrowScript that seems to have another implementation I think, so going to be taking a deeper look there for inspiration as well. But if one could explain the steps of the algorithm, and how it integrates/relates with the type inference process, that would be of great use. Not for learning how to use Rust, but to learn how this aspect of its compiler works.
I really like the idea of ownership and ownership types / affine types, which it seems like the borrow checker implements (for garbage collection features and the general type theory benefits you get). Though I am no type theory expert, just been browsing around trying to figure out how the ideal compiler would work, finding things like lobster lang and kind lang along the way.
Related posts
- Kind: A lambda-calculus based pure programming language
- Eliezer Yudkowsky has great news: "Parents conceiving today may have a fair chance of their kids living to see kindergarten."
- Somos os devs da HVM, o compilador Brasileiro que rodou o mundo. Vamos colocar nosso logo no /r/place?
- How to handle list / contiguous array definition and implementation in a type system?
- Type Checking as Calculation