Skip to content

Move ImmutableRecord to own repository and use ImmutableObject trait #106

@codeliner

Description

@codeliner

@enumag uses a neat trick to unset public properties of an object, see this gist

This way magic __get and __set methods of the object are called instead and they can enforce immutability.

This mechanism can even be deactivated in production for performance reasons and it can be combined with the ImmutableRecord logic used for immutable data types in Event Machine powered projects.

To be able to use immutable data types without installing Event Machine, the package should be moved to its own repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions