-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
Nondeterminism as an effect #3094
Copy link
Copy link
Closed
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-concurrencyArea: ConcurrencyArea: ConcurrencyE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-attributesArea: Attributes (`#[…]`, `#![…]`)Area: Attributes (`#[…]`, `#![…]`)A-concurrencyArea: ConcurrencyArea: ConcurrencyE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.Call for participation: Hard difficulty. Experience needed to fix: A lot.
@eholk and I theorise that 'safe' Rust, for not having mutable shared state, currently has two methods for causing nondeterminism -
select/fail(failis basically isomorphic toselectin terms of semantics, though implemented differently under the hood), and I/O.It would be really, really slick if we could prove that one-to-one message-passing is deterministic, and then, pending an effect system, could label all relevant library functions with
#[effect(nondeterminism)]. Enterprising users could then#[forbid]it, and be off to... well, NOT be off to the races.