Re: [Firebird-devel] C++11 features

2016-09-01 Thread Roman Simakov
I guess atomic also must be very helpful.

2016-09-01 20:37 GMT+03:00 Adriano dos Santos Fernandes :
> On 01/09/2016 13:41, Dmitry Yemanov wrote:
>> + nullptr and static_assert, maybe also initializer lists and non-static
>> member initializers.
>>
> And override too, which can be easily defined for nothing when not
> supported (HP aCC) and is a very good tool specially when refactoring code.
>
>
> Adriano
>
>
> --
> Firebird-Devel mailing list, web interface at 
> https://lists.sourceforge.net/lists/listinfo/firebird-devel



-- 
С уважением
Роман Симаков
Директор департамента развития системных продуктов
ООО "Ред Софт"

skype: simakov_roman
www.red-soft.ru

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Adriano dos Santos Fernandes
On 01/09/2016 13:41, Dmitry Yemanov wrote:
> + nullptr and static_assert, maybe also initializer lists and non-static 
> member initializers.
>
And override too, which can be easily defined for nothing when not
supported (HP aCC) and is a very good tool specially when refactoring code.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Dmitry Yemanov
01.09.2016 15:46, Adriano dos Santos Fernandes wrote:
>
> I see that before VC++ 2015 Update 3, it accepts everything supported
> without compiler options, right?

Looks so.

> So, I think the plan should be:
>
> - Update Linux prefix files to include -std=c++11
> - Agree on a set of allowed features
> - Write a readme specifying these features
>
> I can then submit it as PR with some usage of these features, converted
> from old code, so others can see it working in their environments.

Agreed.

> For the set of allowed features, I would want we to be dynamic and
> always evaluate then as necessary, but I would start with:
>
> - auto keyword
> - range-based for loop
> - lambdas

+ nullptr and static_assert, maybe also initializer lists and non-static 
member initializers.


Dmitry


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Adriano dos Santos Fernandes
On 01/09/2016 09:25, Dmitry Yemanov wrote:
> 01.09.2016 14:04, Adriano dos Santos Fernandes wrote:
>> MSVC10 supports nothing, and even MSVC12 is also a bit limited in regard
>> to MSVC14 and recent g++ and clang++:
>>
>> https://msdn.microsoft.com/en-us/library/hh567368.aspx
> We've agreed on MSVC13 for FBv4, so we cannot use features from later 
> versions. As for gcc, are there officially supported Linux distros other 
> than CentOS 6 that use gcc 4.7 or older? RHEL6 is EOL now, fortunately.
>
I see that before VC++ 2015 Update 3, it accepts everything supported
without compiler options, right?

So, I think the plan should be:

- Update Linux prefix files to include -std=c++11
- Agree on a set of allowed features
- Write a readme specifying these features

I can then submit it as PR with some usage of these features, converted
from old code, so others can see it working in their environments.

For the set of allowed features, I would want we to be dynamic and
always evaluate then as necessary, but I would start with:

- auto keyword
- range-based for loop
- lambdas


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Dmitry Yemanov
01.09.2016 14:04, Adriano dos Santos Fernandes wrote:
>
> MSVC10 supports nothing, and even MSVC12 is also a bit limited in regard
> to MSVC14 and recent g++ and clang++:
>
> https://msdn.microsoft.com/en-us/library/hh567368.aspx

We've agreed on MSVC13 for FBv4, so we cannot use features from later 
versions. As for gcc, are there officially supported Linux distros other 
than CentOS 6 that use gcc 4.7 or older? RHEL6 is EOL now, fortunately.


Dmitry


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Adriano dos Santos Fernandes
On 31/08/2016 04:54, Dmitry Yemanov wrote:
> 31.08.2016 05:14, Adriano dos Santos Fernandes wrote:
>> In the code I'm writing, I had good opportunities to use some features
>> that the compiler flags we're using disallowed, like lambda and default
>> arguments for template parameter.
>>
>> Also we have the ubiquitous ugly iterator types in for's with would
>> benefit from "auto".
>>
>> It seems we already had some discussion of usage of some of these
>> features, but builds are not adjusted.
>>
>> The obsolete language standard we're using is so boring and so outdated.
>> We need to move on.
> Basically, I agree. IIRC, a showstopper is MSVC10 support which I'd 
> prefer to keep for a while. But if others don't consider it really 
> important, I'm not going to stop the progress ;-)
>
>
I'm afraid that if we do not peek only very fresh versions of the main
compilers, we can do nothing then, as when joining the feature matrix
nothing will be allowed.

MSVC10 supports nothing, and even MSVC12 is also a bit limited in regard
to MSVC14 and recent g++ and clang++:

https://msdn.microsoft.com/en-us/library/hh567368.aspx


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-09-01 Thread Paul Beach
>As I was said, it would drop out some platforms such as HPUX and Solaris
> where compilers don't support C++11 standard.

>> Are these platforms that significant anymore for Firebird?

Still used (and maintained) by some customers (and IBPhoenix) on 2.5 

> Are there more than 1000 Firebird deployments on them?

HPUX 2.0.3 Classic 2,737 + 3,247 = 5984 Downloads
HPUX 2.1.4 Classic 93 + 113 = 206 Downloads

Solaris (Sparc) Classic 2.0.5 2,305 Downloads
Solaris (Sparc) Classic 2.1.3 793 Downloads

So the trend does seem to be away from such platforms.
If Companies like HP, Oracle, IBM, are not producing current compilers that 
support
such standards, then as you say - its time to move on.

Paul

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Leyne, Sean


>As I was said, it would drop out some platforms such as HPUX and Solaris
> where compilers don't support C++11 standard.

Are these platforms that significant anymore for Firebird?

Are there more than 1000 Firebird deployments on them?


Since we are talking about changes which apply to Firebird v4, I would suggest 
that it is time to move on...


Sean


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Adriano dos Santos Fernandes
On 31/08/2016 08:32, Dimitry Sibiryakov wrote:
> 31.08.2016 13:27, Adriano dos Santos Fernandes wrote:
>> So why are you developing particular code as pool request in the main
>> project?
>"We do what we must because we can." (c)
>
>
Ok, I just unsubscribed myself to that particular PR.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel



Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dimitry Sibiryakov
31.08.2016 13:27, Adriano dos Santos Fernandes wrote:
> So why are you developing particular code as pool request in the main
> project?

   "We do what we must because we can." (c)


-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Adriano dos Santos Fernandes
On 31/08/2016 08:23, Dimitry Sibiryakov wrote:
> 31.08.2016 13:15, Adriano dos Santos Fernandes wrote:
>> You're so funny starting to be against it
>I'm against? No, I use C++11 quite widely out of official Firebird tree.
>But in previous discussion everyone else said "no, we won't use C++11 in 
> Firebird", so 
> when you suggested it again, I said that it is in vain: this suggestion was 
> already declined.

This is not what I remember to be read...


>> being you already done it in your branch: :D
>AFAIU, this branch isn't going to be ever merged into main, so... who 
> cares?
>
So why are you developing particular code as pool request in the main
project?


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dimitry Sibiryakov
31.08.2016 13:15, Adriano dos Santos Fernandes wrote:
> You're so funny starting to be against it

   I'm against? No, I use C++11 quite widely out of official Firebird tree.
   But in previous discussion everyone else said "no, we won't use C++11 in 
Firebird", so 
when you suggested it again, I said that it is in vain: this suggestion was 
already declined.

> being you already done it in your branch: :D

   AFAIU, this branch isn't going to be ever merged into main, so... who cares?

-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Adriano dos Santos Fernandes
On 31/08/2016 04:42, Dimitry Sibiryakov wrote:
> 31.08.2016 4:14, Adriano dos Santos Fernandes wrote:
>> The obsolete language standard we're using is so boring and so outdated.
>> We need to move on.
>As I was said, it would drop out some platforms such as HPUX and Solaris 
> where 
> compilers don't support C++11 standard.
>
>
You're so funny starting to be against it, being you already done it in
your branch: :D

https://github.com/aafemt/firebird/commit/2bed252ff9f74e46212b26cf0c337ca34941d404#diff-f23ac30fe73ee839659d6ecbbc89293c

BTW, -std=c++1 is wrong in prefix.linux


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Adriano dos Santos Fernandes
On 31/08/2016 04:42, Dimitry Sibiryakov wrote:
> 31.08.2016 4:14, Adriano dos Santos Fernandes wrote:
>> The obsolete language standard we're using is so boring and so outdated.
>> We need to move on.
>As I was said, it would drop out some platforms such as HPUX and Solaris 
> where 
> compilers don't support C++11 standard.
>
>
The support for C++11 looks decent even in HP aCC and is complete in IBM
XLC++: http://en.cppreference.com/w/cpp/compiler_support


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dimitry Sibiryakov
31.08.2016 12:47, Adriano dos Santos Fernandes wrote:
> We might continue avoiding the std class library for now, but anyway, we
> should need to use basic things supporting the language, like std::function.

   You either avoid std or not, choose one.
   Basic language things are explicitly deleted constructors and explicit bool 
operator, 
for example. Let alone initialization on declaration for non-static class 
members.


-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Adriano dos Santos Fernandes
On 31/08/2016 05:49, Michal Kubecek wrote:
> This might vary a lot from feature to feature. There may be also
> difference between the language itself and standard library. For
> example, gcc 4.8 (which is the standard compiler in SLES 12, including
> upcoming SP2) supports C++11 as a language dialect but it has completely
> broken std::regex implementation.
>
We might continue avoiding the std class library for now, but anyway, we
should need to use basic things supporting the language, like std::function.


Adriano


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Michal Kubecek
On Wed, Aug 31, 2016 at 10:06:50AM +0200, Thomas Steinmaurer wrote:
> > 31.08.2016 05:14, Adriano dos Santos Fernandes wrote:
> >>
> >> In the code I'm writing, I had good opportunities to use some features
> >> that the compiler flags we're using disallowed, like lambda and default
> >> arguments for template parameter.
> >>
> >> Also we have the ubiquitous ugly iterator types in for's with would
> >> benefit from "auto".
> >>
> >> It seems we already had some discussion of usage of some of these
> >> features, but builds are not adjusted.
> >>
> >> The obsolete language standard we're using is so boring and so outdated.
> >> We need to move on.
> >
> > Basically, I agree. IIRC, a showstopper is MSVC10 support which I'd
> > prefer to keep for a while. But if others don't consider it really
> > important, I'm not going to stop the progress ;-)
> 
> Do we know that the new language features are stable enough?
> 
> I know, you are talking about C++ ... but e.g. we had serious troubles 
> with new fency language stuff in JDK8 like lambdas, streams (under high 
> concurrency) with the JIT compiler etc., thus new is not always better 
> (especially under load) although more convenient for the developer.

This might vary a lot from feature to feature. There may be also
difference between the language itself and standard library. For
example, gcc 4.8 (which is the standard compiler in SLES 12, including
upcoming SP2) supports C++11 as a language dialect but it has completely
broken std::regex implementation.

  Michal Kubecek


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dmitry Yemanov
31.08.2016 11:06, Thomas Steinmaurer wrote:
>
> Do we know that the new language features are stable enough?

So far we speak only about C++11 which is five years old already. And we 
won't know without trying anyway. I remember us discovering bugs in 
compilers during the C++ migration in early 2000s. It was somewhat 
painful but we succeeded and it was worth it.


Dmitry


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Thomas Steinmaurer
> 31.08.2016 05:14, Adriano dos Santos Fernandes wrote:
>>
>> In the code I'm writing, I had good opportunities to use some features
>> that the compiler flags we're using disallowed, like lambda and default
>> arguments for template parameter.
>>
>> Also we have the ubiquitous ugly iterator types in for's with would
>> benefit from "auto".
>>
>> It seems we already had some discussion of usage of some of these
>> features, but builds are not adjusted.
>>
>> The obsolete language standard we're using is so boring and so outdated.
>> We need to move on.
>
> Basically, I agree. IIRC, a showstopper is MSVC10 support which I'd
> prefer to keep for a while. But if others don't consider it really
> important, I'm not going to stop the progress ;-)

Do we know that the new language features are stable enough?

I know, you are talking about C++ ... but e.g. we had serious troubles 
with new fency language stuff in JDK8 like lambdas, streams (under high 
concurrency) with the JIT compiler etc., thus new is not always better 
(especially under load) although more convenient for the developer.


Thomas



--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dmitry Yemanov
31.08.2016 05:14, Adriano dos Santos Fernandes wrote:
>
> In the code I'm writing, I had good opportunities to use some features
> that the compiler flags we're using disallowed, like lambda and default
> arguments for template parameter.
>
> Also we have the ubiquitous ugly iterator types in for's with would
> benefit from "auto".
>
> It seems we already had some discussion of usage of some of these
> features, but builds are not adjusted.
>
> The obsolete language standard we're using is so boring and so outdated.
> We need to move on.

Basically, I agree. IIRC, a showstopper is MSVC10 support which I'd 
prefer to keep for a while. But if others don't consider it really 
important, I'm not going to stop the progress ;-)


Dmitry


--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


Re: [Firebird-devel] C++11 features

2016-08-31 Thread Dimitry Sibiryakov
31.08.2016 4:14, Adriano dos Santos Fernandes wrote:
> The obsolete language standard we're using is so boring and so outdated.
> We need to move on.

   As I was said, it would drop out some platforms such as HPUX and Solaris 
where 
compilers don't support C++11 standard.


-- 
   WBR, SD.

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel


[Firebird-devel] C++11 features

2016-08-30 Thread Adriano dos Santos Fernandes
Hi!

In the code I'm writing, I had good opportunities to use some features
that the compiler flags we're using disallowed, like lambda and default
arguments for template parameter.

Also we have the ubiquitous ugly iterator types in for's with would
benefit from "auto".

It seems we already had some discussion of usage of some of these
features, but builds are not adjusted.

The obsolete language standard we're using is so boring and so outdated.
We need to move on.


Adriano

--
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel