3 ms·
My favorite part of Lua tables is the syntax feature that makes it possible to use a single table argument when calling a function like this: some_func{
by dividuum 8y ago
My favorite part of Lua tables is the syntax feature that makes it possible to use a single table argument when calling a function like this:
some_func{
key = value;
another_key = another_func{
foo = "bar";
}
}
Note the use of { and } instead of ( and ). This almost makes it possible to build a DSL. Oh. And the __mode option in metatables to create weak tables by key/value.