8 comments

[ 4.3 ms ] story [ 26.6 ms ] thread
The title should include "multi-threading" with "tiny binaries" also being of interest. Merely TS with borrow-checker makes no sense at all (or makes for good click-bait--it got me :-)
Ownership and the deep-mutability tracking it allows for would be useful even without the other stuff
But isn't multi threading the target environment for ownership analysis?

Js is mainly single threaded.

No, an "owner" in this context is an object/function/closure. Threads come into it but they aren't the central focus.
That sounds like the easiest way to implement it. Giving ownership to threads and scheduling coroutines on them is unnecessarily complicated, given that a single coroutine can only be running on one thread at a time.
This is exciting.

In Rust, unique ownership and borrowing eliminate defensive coding: you never need to copy "just in case", because the type system makes it clear who can modify what and when.

Elimination of unintentional shared mutable state is generally helpful. It's not just about bare-metal no-GC performance, but helps document and enforce data sharing contract between libraries and their users.

This should be obvious from the borrow checker part but for people here hoping for more;

> Note that this does not aim to be compatible with TypeScript and JavaScript libraries instead

The project got renamed to BorrowScript.