Skip to main content
Next (unreleased) · docs c218d875 · core f63c1e69 · built 2026-10-26 22:39 UTC

Callable<A, B> does not exist, so a function type cannot be bounded by an aspect

Gap​

A plain function and a closure share one type, |A| -> B; there is no fun(A) -> B pointer type. The aspect that function types are sometimes described as implementing, Callable<A, B>, is not defined in std::core, so no bound names it and dyn Callable cannot be written. RFC-0161 (1-under-review) proposes the contract.

Impact​

No aspect bound can require "any callable", and dyn Callable cannot be written.

Affects​

Resolution​

Planned, tracked as metel-core#923 (RFC-0161, 1-under-review). Deliberately kept off the ownership-and-freeze themes of the roadmap: Callable/dyn Callable completes the closure/aspect surface but establishes no new identity for the language, unlike the ownership and row-polymorphism work those themes carry. It sits with the other design settlement deferred the same way (comptime, derive, record conversions).