Skip to content

init?(_:) vs init(_:) #135

@oscbyspro

Description

@oscbyspro

BinaryInteger initializers of the form T/init(_:) are abbreviations of T.exactly(_:).unwrap(). Alternatively, I could return Optional<T>. Optional<T> force-unwrapping is only one additional character ("!") and explicit error-handling is awesome. In this hypothetical rework, init?(_:) would an abbreviation of T.exactly(_:).optional().

Metadata

Metadata

Assignees

No one assigned

    Labels

    additionoh, so shiny!brrrsuch code, much wowmaybeto do, or not to do?subtractionhuh? where did it go?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions