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

2013-09-05 Thread Matthew Brush
On 13-09-04 09:20 AM, Nick Treleaven wrote: On 01/09/2013 02:36, Matthew Brush wrote: I would even go so far as to say it's silly to not use C++11 since it's [...] Just for fun I wrote some theoretical code that could be used in a program like Geany to compare styles between various C's and

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

2013-09-05 Thread Nick Treleaven
On 05/09/2013 09:41, Matthew Brush wrote: On 13-09-04 09:20 AM, Nick Treleaven wrote: My C89 C++ version: guint i; foreach_document(i) { GeanyDocument *doc = documents[i]; // do stuff with every valid doc } While this code is short, it's actually sort of nuts too (and also not

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

2013-09-05 Thread Nick Treleaven
On 01/09/2013 02:36, Matthew Brush wrote: On 13-08-29 05:08 AM, Nick Treleaven wrote: On 29/08/2013 02:39, Matthew Brush wrote: [...] If we were to use C++, I think it'd be pointless to limit it to CFront/CwithClasses-style 1980's C++. We should use common/standard stuff like standard

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

2013-09-05 Thread Matthew Brush
On 13-09-05 02:26 AM, Nick Treleaven wrote: On 01/09/2013 02:36, Matthew Brush wrote: On 13-08-29 05:08 AM, Nick Treleaven wrote: On 29/08/2013 02:39, Matthew Brush wrote: [...] If we were to use C++, I think it'd be pointless to limit it to CFront/CwithClasses-style 1980's C++. We should

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

2013-09-05 Thread Lex Trotman
[...] Hi Nick, Still somewhat noisy IMO. How about this, C++98 (I think): #include boost/foreach.hpp #define FOREACH BOOST_FOREACH FOREACH(Document doc, win.documents()) { // do stuff with each document } Frankly if you want to limit the parts of standard C++ that are used, the