On 29/08/2013 13:52, Lex Trotman wrote:
I would even go so far as to say it's silly to not use C++11 since it's
such a major improvement over previous C++ versions, in both performance
I'm curious, why does it perform better?
I'm putting words in Matthews mouth here, but things like move semantics can reduce the need for allocations and copying, but like all such "performance improvements" it needs to be used a zillion times before it matters, and well, Geany does few things a zillion times (except inside Scintilla's rendering code).
OK.
Readability is definitely better in C++11 when avoiding iterators and using lambdas, but I was kind of hoping we could avoid those ugly cases. I wasn't thinking of using the STL heavily, just a few containers like string, and perhaps others for any specialized use cases.
Sadly, containers means iterators, inevitably, and yes C++03 syntax is ugly, but you get used to it, and just type it automatically. Pity "auto" and "for( a: container )" is C++11, oh well.
Yes. Unless we use a foreach macro ;-P I'm not sure iterators are needed often for string though, but it's been a while since I looked at code using it.
I proposed banning OOP, operator overloading and exceptions in src to make
it (much?) easier to understand & maintain the code vs idiomatic C++, with all its unintuitive bug-prone corner cases (which are still in C++11), see my reply to Lex for more info.
Looking at it again, I'm not sure we mean the same thing by OOP, its a much abused and overloaded term, could you perhaps explain your meaning? Depending on what you mean, banning it is either sensible, or the silliest idea ever :)
I mean inheritance and virtual functions. I don't think they would pull their weight in src, unless we were going to use gtkmm for custom widgets.
Yes, or maybe convert a core plugin that uses strings a lot, so we get the benefit of RAII. I might look into it unless Colomban is against that (even for a core plugin).
Good idea, plugins can be written in C++ now, without any changes to Geany being needed. Just make sure you don't leak exceptions (unless you mean to) since they currently mean terminate().
OK.
Regards, Nick