Skip to content

Explore marking arrays with a metatable #535

@ark120202

Description

@ark120202

Since now there is no difference between {} and [], it's impossible to implement a stable Array.isArray. Transpling array literals to setmetatable({}, ____arrayMetatable) gives required data for Array.isArray and doesn't affect performance too much.

A major issue is that there would be a need for a new decorator (or a type) to mark functions that return standard lua arrays, and then set the metatable of returned values.

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