mirror of
https://github.com/luau-lang/rfcs.git
synced 2025-05-04 10:43:48 +01:00
Small addition to motivation
This commit is contained in:
parent
f27c9a5257
commit
9e7a95835a
1 changed files with 5 additions and 4 deletions
|
@ -53,10 +53,11 @@ end
|
|||
|
||||
return table.freeze(module)
|
||||
```
|
||||
Using this method, the name of the returned table needs to be written (2 + n) times, where n is the
|
||||
number of variables you export. Every exported variable also needs to be written at least one or
|
||||
three times. Potentially three times because you may need to localize exported variables before
|
||||
adding them to the returned table. An example of this would be the following.
|
||||
Using this method, you lose localization of exported variables, which for example may have a
|
||||
negative impact on performance. Furthermore, the name of the returned table needs to be written
|
||||
(2 + n) times, where n is the number of variables you export. Every exported variable also needs to
|
||||
be written at least one or three times. Potentially three times because you may need to localize
|
||||
exported variables before adding them to the returned table. An example of this would be the following.
|
||||
```lua
|
||||
local module = {}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue