Open gligneul opened 4 years ago
The proposed syntax is ambiguous with arrays of functions.
We could use {A=>B}
instead. Or {A:B}
, like Typed Lua
Indeed. I would use {A=>B}
to make clear it is not a table.
Anyone who implement this could use the PR #139 as inspiration.
AKA associative array. The proposed syntax is
{T1 -> T2}
. Like arrays, indexing an entry that yields nil might result in a runtime type error.