Defaultable

public protocol Defaultable

Protocol for types with a meaningful zero/default value.

Defaultable is what T() resolves to when no other init is chosen. Conform when there's an obvious default: 0 for numbers, "" for strings, the empty collection for containers. Don't conform just to satisfy a generic bound — the absence of a default is information.

Initializers

init()

Builds the default-valued instance.

Defined in lang/std/core/protocols.ks