Why Nostr? What is Njump?
2024-03-23 16:47:37

conduition on Nostr: I suppose bitcoin devs love #Rust for the same reasons they love Bitcoin. The ...

I suppose bitcoin devs love #Rust for the same reasons they love Bitcoin.

The scarcity and careful auditing of variables passed around in memory mirrors the scarcity and careful auditing of UTXOs passed around Bitcoin's ledger. Allocating new memory is as much an event as mining new bitcoins: Regular, but noted and tracked.

In Rust, a value may be borrowed many times, but its value may be consumed only once. Bitcoins can likewise be IOU'd countless times, but ultimately only belong to one script-pubkey.

By comparison, languages like Go and Javascript feel very... inflationary. They have an opaque, centralized, bloated, and omnipotent garbage collector attached to every runtime which allocates and deallocates memory as it pleases. Memory can be needlessly duplicated thousands of times entirely by accident, or over-collateralized by shared mutable references.

Some languages are the opposite, like C: Total anarchy. "Sure, allocate as much memory as you'd like. Deallocate it whenever. Read whatever you want, write wherever. Just try not to segfault."

Only Rust, like Bitcoin, strikes the perfect balance of organized chaos: a rehearsed ballet, in which all the dancers know their movements by heart.
Author Public Key
npub1l6uy9chxyn943cmylrmukd3uqdq8h623nt2gxfh4rruhdv64zpvsx6zvtg