Skip to content

Manual Inclusion in __init__, an alternative to @postinit #2

Description

@SBuercklin

Rather than forcing an implementation of __init__ on the user and having them opt into their own __init__ with @postinit, could you instead expose a function which has a method implementation for each module, and the user manually include that in their __init__? This is the approach that BinaryTraits.jl takes, reference here.

I think this would be much less disruptive to users workflows than having them restructure their existing __init__s per package.

I really like the idea that this package enforces the presence of fields as part of an interface, that's an issue I've not found a good solution for, and this looks promising. Thanks for the contribution!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions