Skip to content
This repository was archived by the owner on Aug 26, 2020. It is now read-only.
This repository was archived by the owner on Aug 26, 2020. It is now read-only.

Hiding the id from the Actor struct #4

Description

@tisztamo

Do not force the user to write boilerplate like

mutable struct TreeActor <: Component
    id::ComponentId
    children::Vector{ComponentId}
    TreeActor() = new(rand(ComponentId), [])
end

The ideal solution would be

mutable struct TreeActor <: Component
    children::Vector{ComponentId}
    TreeActor() = new([])
end

And also providing the alternative

@component TreeActor
    children::Vector{ComponentId}
    TreeActor() = new([])
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions