[type_traits] Time to upgrade to "version 2" ?
Now that the release is out it's decision time: I'd like to merge the "Version2" branch of type_traits to develop, it passes all the tests, and I've been using it exclusively for testing and development locally for a few months now without issues. But.... it's a big change with the potential to break a lot of folks stuff if things go wrong given that this is such a core component. To recap the main advantages are: * Removed all the redundant cruft that's no longer required for old/broken compilers we don't support anymore anyway. * Very nearly dependency free (other than Config), there's just comon_type which still has dependencies elsewhere - and even that disappears for a C++11 compiler. * Much cleaner, easier to understand code, now that the horrid obfuscating macros introduced by MPL have gone. * Fewer template instantiations than before as much of the indirection / forwarding templates have been removed. * As a result code using these headers should be somewhat faster to compile - both with fewer template instantiations, and a much lighter #include load. Note that as a result of this change, a number of undocumented headers which were none the less being used in Boost have been deprecated. The headers still exist, but warn loud and clear about their deprecated status, so folks will get a lot of warnings to begin with. I know Edward Diener has submitted some PR's to fix these, but I plan to make a concerted attack on any remaining once the new version is in develop. So here's the question, how do we proceed? My thoughts are to basically go ahead and merge, but not merge to master until after the next release at the earliest to give everything a chance to bed down, and the required changes in other libraries to filter through. Or we could have some sort of mini-review either formally or informally to check things out before the merge - of course folks are most welcome to do this anyway! Let me know what you think, best, John.
On 5/15/2015 12:09 PM, John Maddock wrote:
Now that the release is out it's decision time:
I'd like to merge the "Version2" branch of type_traits to develop, it passes all the tests, and I've been using it exclusively for testing and development locally for a few months now without issues. But.... it's a big change with the potential to break a lot of folks stuff if things go wrong given that this is such a core component. To recap the main advantages are:
* Very nearly dependency free (other than Config), there's just comon_type which still has dependencies elsewhere - and even that disappears for a C++11 compiler.
I'm curious, `std::common_type` has accepted defects (LWG2141. common_type trait produces reference types; LWG2408. SFINAE-friendly common_type/iterator_traits is missing in C++14) as well as active ones (LWG2465. SFINAE-friendly common_type is nearly impossible to specialize correctly and regresses key functionality). Which semantics does `boost::common_type` v2 provide? Regards, -- Agustín K-ballo Bergé.- http://talesofcpp.fusionfenix.com
On 5/15/2015 2:09 PM, John Maddock wrote:
Now that the release is out it's decision time:
I'd like to merge the "Version2" branch of type_traits to develop, it passes all the tests, and I've been using it exclusively for testing and development locally for a few months now without issues. But.... it's a big change with the potential to break a lot of folks stuff if things go wrong given that this is such a core component. To recap the main advantages are:
* Removed all the redundant cruft that's no longer required for old/broken compilers we don't support anymore anyway. * Very nearly dependency free (other than Config), there's just comon_type which still has dependencies elsewhere - and even that disappears for a C++11 compiler. * Much cleaner, easier to understand code, now that the horrid obfuscating macros introduced by MPL have gone. * Fewer template instantiations than before as much of the indirection / forwarding templates have been removed. * As a result code using these headers should be somewhat faster to compile - both with fewer template instantiations, and a much lighter #include load.
Note that as a result of this change, a number of undocumented headers which were none the less being used in Boost have been deprecated. The headers still exist, but warn loud and clear about their deprecated status, so folks will get a lot of warnings to begin with. I know Edward Diener has submitted some PR's to fix these, but I plan to make a concerted attack on any remaining once the new version is in develop.
A number of those PRs are still sitting there because no one is looking to apply them. These include changes for lambda, function_types, and iterator. I applied for administrator rights for lambda and function_types, willing to deal with any bug reports and PRs in those libraries since neither is being actively maintained, but no one seems to be dealing with those requests in boost.admin. Noel Belcourt has replied to me that he has been busy but will try to look at iterator.
So here's the question, how do we proceed?
My thoughts are to basically go ahead and merge, but not merge to master until after the next release at the earliest to give everything a chance to bed down, and the required changes in other libraries to filter through. Or we could have some sort of mini-review either formally or informally to check things out before the merge - of course folks are most welcome to do this anyway!
Let me know what you think, best, John.
My vote is to go ahead, but I also feel it is important to get PRs which eliminate your deprecated warnings message applied so that testing output will be smoother. I have detailed the ones I have found above and endeavored to fix with PRs.
John Maddock wrote:
So here's the question, how do we proceed?
My thoughts are to basically go ahead and merge, but not merge to master until after the next release at the earliest to give everything a chance to bed down, and the required changes in other libraries to filter through.
I agree with this. Practice has shown that until the changes are in develop, testing and integration won't really happen. We could delay the merge, but this will not buy us much, if anything.
Now that the release is out it's decision time:
I'd like to merge the "Version2" branch of type_traits to develop, it passes all the tests, and I've been using it exclusively for testing and development locally for a few months now without issues. But.... it's a big change with the potential to break a lot of folks stuff if things go wrong given that this is such a core component. To recap the main advantages are:
So here's the question, how do we proceed? I don't know if you have run all the regression test at least on one
Le 15/05/15 20:09, John Maddock a écrit : platform/compiler. If not, this should give you a good idea of the impact.
My thoughts are to basically go ahead and merge, but not merge to master until after the next release at the earliest to give everything a chance to bed down, and the required changes in other libraries to filter through.
Do you mean that you will not merge to master for release 1.59? If this is the case, I would be against. How would you manage to fix current issues on master branch?
Or we could have some sort of mini-review either formally or informally to check things out before the merge - of course folks are most welcome to do this anyway!
Let me know what you think, best, John.
I don't think we need the mini-review. Vicente
El 15/05/2015 a las 20:09, John Maddock escribió:
Now that the release is out it's decision time:
I'd like to merge the "Version2" branch of type_traits to develop, it passes all the tests, and I've been using it exclusively for testing and development locally for a few months now without issues. But.... it's a big change with the potential to break a lot of folks stuff if things go wrong given that this is such a core component.
I agree with your proposal, great job. Is there anything that we could make to make to take away common_type dependencies? A single utility seems very little to split between type_traits.core and type_traits, but it's a bit annoying type_traits.v2 is not free of any other dependencies. Embedding typeof in typetraits seems impossible as it needs a lot of metaprogramming and preprocessor machinery. Best, Ion
Le 16/05/15 14:03, Peter Dimov a écrit :
Ion Gaztañaga wrote:
Is there anything that we could make to make to take away common_type dependencies?
Let's just make it its own module and be done with it. I agreed. John could you extract it for "version 2"? Could I do something?
Vicente
On 16/05/2015 18:44, Vicente J. Botet Escriba wrote:
Le 16/05/15 14:03, Peter Dimov a écrit :
Ion Gaztañaga wrote:
Is there anything that we could make to make to take away common_type dependencies?
Let's just make it its own module and be done with it. I agreed. John could you extract it for "version 2"? Could I do something?
I have to be honest, I don't like splitting stuff up, but OK I'll go with the flow. Let's split it. I've just made a bug fix to develop - when the tests have cycled on that I'll merge to release and then merge the new type_traits to develop. I guess immediately after that would be a good time to spin off common_type - not sure what the process is? John.
Conceptually, common_type is a type_trait. We should not be so quick to
worship at the altar of removing dependencies that we compromise logical
design or introduce code duplication. I don't think a dependency-free graph
is necessarily desirable -- the whole reason we have Boost is to create
reusable components.
On Sun, May 17, 2015 at 1:51 AM, John Maddock
On 16/05/2015 18:44, Vicente J. Botet Escriba wrote:
Le 16/05/15 14:03, Peter Dimov a écrit :
Ion Gaztañaga wrote:
Is there anything that we could make to make to take away common_type
dependencies?
Let's just make it its own module and be done with it.
I agreed. John could you extract it for "version 2"? Could I do something?
I have to be honest, I don't like splitting stuff up, but OK I'll go with the flow. Let's split it.
I've just made a bug fix to develop - when the tests have cycled on that I'll merge to release and then merge the new type_traits to develop. I guess immediately after that would be a good time to spin off common_type - not sure what the process is?
John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Le 17/05/15 18:50, David Stone a écrit :
Conceptually, common_type is a type_trait. We should not be so quick to worship at the altar of removing dependencies that we compromise logical design or introduce code duplication. I don't think a dependency-free graph is necessarily desirable -- the whole reason we have Boost is to create reusable components.
We have discussed this a lot of times. The file will be located in the same way when you use the complete Boost. The documentation could include a note explaining where you can find now this little sub-module. So I don't see how this split will compromise the component re-usability and why this could mean code duplication. Please, could you elaborate? Best, Vicente
On 17/05/2015 17:50, David Stone wrote:
Conceptually, common_type is a type_trait. We should not be so quick to worship at the altar of removing dependencies that we compromise logical design or introduce code duplication. I don't think a dependency-free graph is necessarily desirable -- the whole reason we have Boost is to create reusable components.
Largely I'm inclined to agree... but I can see the attraction of a modular boost as well. I think it's vital when we do this that the end user gets a seamless experience, so I would document the trait with the rest of type_traits docs, but with a small note that if you're downloading a modular boost (which we don't quite have yet, but we're getting there) then you must also download the common_type module. Actually, on the off chance that we end up with other type_traits that are more heavyweight than normal, a more generic name for the module would be better, but I can't think what at present? I guess come to that it could go into utility? John.
On Sun, May 17, 2015 at 12:23 PM, John Maddock
On 17/05/2015 17:50, David Stone wrote:
Conceptually, common_type is a type_trait. We should not be so quick to worship at the altar of removing dependencies that we compromise logical design or introduce code duplication. I don't think a dependency-free graph is necessarily desirable -- the whole reason we have Boost is to create reusable components.
Largely I'm inclined to agree... but I can see the attraction of a modular boost as well.
I think it's vital when we do this that the end user gets a seamless experience, so I would document the trait with the rest of type_traits docs, but with a small note that if you're downloading a modular boost (which we don't quite have yet, but we're getting there) then you must also download the common_type module.
The point about a seamless user experience is a good one. As we start to test modular distribution (in addition to the current monolithic distribution), we should include common_type as one of our use cases. --Beman
Le 17/05/15 09:51, John Maddock a écrit :
On 16/05/2015 18:44, Vicente J. Botet Escriba wrote:
Le 16/05/15 14:03, Peter Dimov a écrit :
Ion Gaztañaga wrote:
Is there anything that we could make to make to take away common_type dependencies?
Let's just make it its own module and be done with it. I agreed. John could you extract it for "version 2"? Could I do something?
I have to be honest, I don't like splitting stuff up, but OK I'll go with the flow. Let's split it.
I've just made a bug fix to develop - when the tests have cycled on that I'll merge to release and then merge the new type_traits to develop. I guess immediately after that would be a good time to spin off common_type - not sure what the process is?
Thanks John, Please, let me know when I can take the relay or I can be of any help, Vicente
participants (9)
-
Agustín K-ballo Bergé
-
Ahmed Charles
-
Beman Dawes
-
David Stone
-
Edward Diener
-
Ion Gaztañaga
-
John Maddock
-
Peter Dimov
-
Vicente J. Botet Escriba