[Geany-Devel] Let's move to C++98 - Re: Lets move to C99

Nick Treleaven nick.treleaven at xxxxx
Sat Aug 31 14:05:32 UTC 2013


On 29/08/2013 06:47, Lex Trotman wrote:
> On the topic of exceptions, remember many STL operations and "new" can
> throw.  Of course only throwing on uncorrectable errors like out of memory
> is fine, it just exits the application.  Thats what will happen to a throw
> from Scintilla in current Geany, its not something that will be introduced.
>   But as resource management moves to RAII, exceptions can be caught and
> produce a more user friendly exit such as dumping buffers first.

OK. We might not want to use -fno-exceptions then, but maybe still avoid 
throwing ourselves.

> On using gtkmm, personally I think it is *way* better than the C interface
> to GTK, but I don't know if it can be mixed with C GTK easily, and changing
> *everything at once* would be a big job.

I don't know either, but gtkmm is much better than GObject boilerplate. 
Although I don't think we need custom objects that often.

> Not sure why the RTTI affects the ABI, things visible in the ABI must be
> POD to maintain C compatibility, there are much stricter limitations to
> maintaining POD, like no non-trivial constructors etc.

OK, so a struct declaration in extern C would be compatible with the C ABI.

> We need to organise the resources first, doing things "to attract more
> contributors" have so far failed, I wouldn't bet a change like this on
> attracting more support (at least in the time the change is happening).

I think moving to C99 may at least avoid /deterring/ further 
contributions because of minor issues like C++-style comments and 
variable declaration after code (or at least in a for statement). I 
don't know if it makes a big difference, but the fewer unnecessary 
hurdles we make them jump through the better.

> Nick has offered that C++ "might" attract him to contribute more, I "might"
> have time at the end of my current contract, unless I get another quickly,
> I guess Colomban is out, Matthew? anybody else?

I'm happy to manage/co-ordinate the transition to C++ (at a slowish 
pace), should we decide we want that.


More information about the Devel mailing list