Future.Prelude

Module future.prelude

import future.prelude

Proposed additions to the prelude that have not landed yet.

Prelude declarations still under proposal.

These are prelude declarations from proposals that have not been accepted. They follow the same rules as the rest of future: they may change, and they may be removed.

Bound belongs to ZE-007 Attribute Binding, which proposes calling an attribute’s members on a value directly instead of going through the attribute.

Dependencies


Contents


Attributes

Bound

`future/prelude/ZE-007-attribute-binding.zirr:28`
attr Bound

A bound function of an attribute receives the targeted value as first argument.

attr Error {
	@Bound()
	debug(err) -> String
}

@Error(fn(err) { return err.message })
data MessageError {
	message: String
}

MessageError("msg")[@Error].debug() // err-receiver passed automatically

Constants

ZE_007

`future/prelude/ZE-007-attribute-binding.zirr:10`
const ZE_007

ZE-007: Attribute Binding
https://zirric.knabel.dev/proposals/ZE-007-attribute-binding