corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan i <>
Subject C99 versus C++ (limited)
Date Mon, 10 Aug 2015 11:26:23 GMT

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
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

I fail to see what we loose by making the change, but please give your

jan i.

Ps. This is in no way a vote thread, but simply a way to gather opinions.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message