Skip to content

declare_class!: Safer initializers #438

@madsmtm

Description

@madsmtm

Use something similar to Swift's rules for initializers, which we may be able to with a combination of types and a proc-macro, to verify that initializers only access the things that they are allowed to.

Should also somehow make ivars safe to declare, by statically ensuring that they are initialized - i.e. this issue ties in heavily with #414).

See also the Objective-C docs on initialization and a bit more about designated initializers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frameworkAffects the framework crates and the translator for themA-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions