Return-Path: X-Original-To: apmail-corinthia-dev-archive@minotaur.apache.org Delivered-To: apmail-corinthia-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E2F0818466 for ; Mon, 10 Aug 2015 11:26:27 +0000 (UTC) Received: (qmail 25116 invoked by uid 500); 10 Aug 2015 11:26:27 -0000 Delivered-To: apmail-corinthia-dev-archive@corinthia.apache.org Received: (qmail 25082 invoked by uid 500); 10 Aug 2015 11:26:27 -0000 Mailing-List: contact dev-help@corinthia.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@corinthia.incubator.apache.org Delivered-To: mailing list dev@corinthia.incubator.apache.org Received: (qmail 25071 invoked by uid 99); 10 Aug 2015 11:26:27 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2015 11:26:27 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 26AC7C0CE8 for ; Mon, 10 Aug 2015 11:26:27 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.971 X-Spam-Level: *** X-Spam-Status: No, score=3.971 tagged_above=-999 required=6.31 tests=[AC_DIV_BONANZA=0.001, HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id czdsHk46J-9L for ; Mon, 10 Aug 2015 11:26:26 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 43558205B3 for ; Mon, 10 Aug 2015 11:26:26 +0000 (UTC) Received: (qmail 25063 invoked by uid 99); 10 Aug 2015 11:26:26 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Aug 2015 11:26:26 +0000 Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 97C591A01A8 for ; Mon, 10 Aug 2015 11:26:25 +0000 (UTC) Received: by lbbsx3 with SMTP id sx3so9503842lbb.0 for ; Mon, 10 Aug 2015 04:26:23 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.152.28.193 with SMTP id d1mr5964395lah.72.1439205983892; Mon, 10 Aug 2015 04:26:23 -0700 (PDT) Received: by 10.25.35.141 with HTTP; Mon, 10 Aug 2015 04:26:23 -0700 (PDT) Date: Mon, 10 Aug 2015 13:26:23 +0200 Message-ID: Subject: C99 versus C++ (limited) From: jan i To: "dev@corinthia.incubator.apache.org" Content-Type: multipart/alternative; boundary=089e0158bb206dbe22051cf34113 --089e0158bb206dbe22051cf34113 Content-Type: text/plain; charset=UTF-8 Hi Peter and I talked the other day and among others about the benefits of using C++ instead of sticking to C99. This would be a major change in the project (less in the code, more in the "how to"), and it is not something we should "just" do. I favor C++, but not unlimited, I see 2 places where C++ can give us more stable code: - Interfaces. Using classes to group our functions (like e.g. platform, core, filters/odf etc.), would make it very clear where the function originates. It would also allow group global variables that are private to the rest of the world. I would not use real interface classes, for our internal grouping, that is not needed. But e.g. the DocFormats API should be a real interface class - Automatic. At the moment we have a lot of code managing construction/deconstruction, that could be totally automated by use of C++ smart pointers. - Object model (filters, flat and core) would be more logically represented as objects, and suddenly copying etc. would be a lot easier. I would not like to see big inheritance (especially not multiple inheritance). I fail to see what we loose by making the change, but please give your opinion. rgds jan i. Ps. This is in no way a vote thread, but simply a way to gather opinions. --089e0158bb206dbe22051cf34113--