Skip to content
This repository was archived by the owner on Mar 15, 2025. It is now read-only.
This repository was archived by the owner on Mar 15, 2025. It is now read-only.

Add methods to the class table of Lua bindings. #73

Description

@Possseidon

For a functional style of programming it is very useful to have access to all the methods directly.

For example, given a table values of vec3, if one would want to sort them by length, then this:

table.sort(values, by(vec3.getLength))

is a lot nicer (and more performant) than this:

table.sort(values, by(function(vector) return vector:getLength() end))
-- or
table.sort(values, by(vec3().getLength))

(Where by returns a comparator based on the given projection function)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions