[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: recognizing whether a caller uses function result
- From: bil til <biltil52@...>
- Date: Wed, 22 Feb 2023 11:23:59 +0100
But as I understand you, you create the C code for this
"Redis.call(...)" by yourself?
Is it not possible, that you use a first "conf string parameter", e.
g. Redis.call(conf, ...), and the conf parameter would then decide,
whether "wait for end" is used for this command or not?
Or you create two calls, e. g. Redis.call_nowait(...) and
Redis.call_wait(...) (maybe some nicer names of couse...).
You might not like the idea, that the Lua user then has to do this
decision.... . (but to my programming experience, it is very
dangerous, if "automatic decisions" are hidden "inside the
compiler/interpreter" - e. g. when starting C++, I was very fascinated
by operator overloading and used them very often... today I do not
like this any more, because it tends to make code somehow
"unreadable", if you have to expect "unexpected surprises'" - I would
use operator overload functions today only for "very clear things").