Skip to content

Method Chaining #197

@ntut-rick

Description

@ntut-rick

This is too verbose:

auto obj = GameObject();
obj.SetDrawable(d);
obj.SetZindex(99);
obj.SetWhatever(nicely);

a better approach:

auto obj = GameObject()
               .SetDrawable(d) 
               .SetZIndex(99)
               .SetWhatever(nicely);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    🆕 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions