lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 2018-01-24 08:24 PM, dyngeccetor8 wrote:
On 01/24/2018 09:49 PM, Egor Skriptunoff wrote:
Just tested Lua from GutHub.
-- insert elements into some object
local function insert(obj, elem1, elem2, ...)
Lua 5.3.4  Copyright (C) 1994-2017, PUC-Rio
Lua 5.4.0  Copyright (C) 1994-2017, PUC-Rio
-- Egor
In my code vararg functions not often [1]. And they have no
critical impact on performance. So (in my view) your benchmark
nicely exploits untypical case.

[1] History of style changes.

1. It looked ugly for me to write "for i = 1, select('#', ...)".
2. So I've started to write "arg = {...}" and for with ipairs().
3. And then it's occurred that more clear just to pass table instead
of sequence: "f(self, some, unknown, params)" vs
"f(self, some, {unknown, params})".

-- Martin

Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.