From: Cyrill Gorcunov <gorcunov@gmail.com> To: Timur Safin <tsafin@tarantool.org> Cc: 'tml' <tarantool-patches@dev.tarantool.org>, 'Vladislav Shpilevoy' <v.shpilevoy@tarantool.org>, 'Alexander Turenko' <alexander.turenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 00/22] Use void type in empty arguments list Date: Mon, 6 Jul 2020 18:09:35 +0300 [thread overview] Message-ID: <20200706150935.GN2256@grain> (raw) In-Reply-To: <0ef401d6539a$13a1ad00$3ae50700$@tarantool.org> On Mon, Jul 06, 2020 at 04:33:46PM +0300, Timur Safin wrote: > : > : IIRC we've been planning to switch to C eventually. > > Please, not - the last time we discussed this question we have specifically > asked to not waste time in this direction. And looks like we agreed on it. I simply gave up because the only arguments "for" C++ was templates and I really doubt that we can't live without them. Another snippet from ++ was that named "guards" which are calling destructors implicitly. I'm pretty sure this is redundant and we can easily use explicit cleanups. Errors class is a special beast but can be addressed as well. > In any case - plans or not is not relevant here, we are discussing current > C++ code which has slightly different guidelines to ANSI C. And this is > a rare case which specifically described in C++ Core Guidelines. We're working not with plain C++ but rather C/C++ mixture. Not taking into consideration the unification preference the functions from ++ code are exported into plain C code and that is a problem having declaration like extern void foo(); is fine for C++ but in C it is gonna be interpreted as being taking arguments and calling it as foo(1) won't cause build time error while it should. Thus rule of thumb for tarantool code is to describe empty args as void ones.
next prev parent reply other threads:[~2020-07-06 15:09 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-03 14:45 Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 01/22] version: use void for empty args Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 02/22] crc32: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 03/22] title: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 04/22] proc_title: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 05/22] systemd: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 06/22] main: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 07/22] say: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 08/22] memory: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 09/22] fiber: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 10/22] diag: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 11/22] coio: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 12/22] cbus: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 13/22] backtrace: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 14/22] call: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 15/22] call_id_cache: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 16/22] schema: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 17/22] sql: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 18/22] user: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 19/22] session: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 20/22] iproto: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 21/22] wal: " Cyrill Gorcunov 2020-07-03 14:45 ` [Tarantool-patches] [PATCH 22/22] box: " Cyrill Gorcunov 2020-07-03 21:23 ` [Tarantool-patches] [PATCH 00/22] Use void type in empty arguments list Vladislav Shpilevoy 2020-07-04 7:30 ` Cyrill Gorcunov 2020-07-05 21:19 ` Timur Safin 2020-07-05 21:37 ` Cyrill Gorcunov 2020-07-06 13:33 ` Timur Safin 2020-07-06 15:09 ` Cyrill Gorcunov [this message] 2020-07-08 12:55 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200706150935.GN2256@grain \ --to=gorcunov@gmail.com \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --cc=tsafin@tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 00/22] Use void type in empty arguments list' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox