CEP-0050: Async, Concurrency, and Effects¶
Draft
Draft proposal family entry for async syntax, concurrency primitives, and effect annotations. These are outside V1 and V2 unless promoted.
Summary¶
Catalyst should eventually decide whether to add async syntax, fibers, coroutines, structured concurrency, effect annotations, and concurrency marker contracts.
V1 has no async or concurrency model beyond ordinary functions and explicit APIs.
Example¶
Possible future shape:
async fn fetch_user(id: UserId) User!NetworkError {
const response = await http.get(user_url(id))
return parse_user(response.body)
}
This proposal family must be split before acceptance because async syntax, scheduling, effects, cancellation, and ownership are separable design problems.
Motivation¶
Async and concurrency affect function types, ownership, resources, cancellation, allocation, scheduling, realtime constraints, and ABI. They need a deliberate design rather than incidental library growth.
Proposed Direction¶
The future design should be split into focused CEPs before acceptance. Topics include:
- explicit async syntax;
- fibers, coroutines, or structured concurrency;
- effect annotations;
- send/share marker contracts for concurrency.
V1 Compatibility¶
V1 rejects async-specific syntax and does not define concurrency marker contracts.