[ 
https://issues.apache.org/jira/browse/THRIFT-2717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14143739#comment-14143739
 ] 

Ben Craig edited comment on THRIFT-2717 at 9/22/14 8:23 PM:
------------------------------------------------------------

I think I've had a misunderstanding with what this is about.  Originally, I 
thought that this was adding new thrift compiler support and a new thrift 
library.  After Konrad's last comment though (and a more careful reading of the 
description), I think this is just adding new thrift compiler support, but 
reusing the existing C\+\+ library.

If that is the case, it may make sense to mention early in the description that 
this is not changing the library.

We need to be sure and be careful with this fork.  It needs to add genuine 
value, and not just be a fork for the sake of using "cool new features".  Note 
that the C\+\+98 branch works just fine in a C\+\+11 environment.

I think that some of the reasons people are asking for a C\+\+11 version is 
because they don't like mixing boost::shared_ptr and std::shared_ptr.  We risk 
running into the same problem with boost::optional and boost::future.  
std::optional almost made it in to C\+\+14.  I suspect something like it will 
appear in C\+\+17.  std::future is already in C\+\+11, so if we go with the 
boost version, then we will need some very strong rationale for that.


was (Author: ben.craig):
I think I've had a misunderstanding with what this is about.  Originally, I 
thought that this was adding new thrift compiler support and a new thrift 
library.  After Konrad's last comment though (and a more careful reading of the 
description), I think this is just adding new thrift compiler support, but 
reusing the existing C\+\+ library.

If that is the case, it may make sense to mention early in the description that 
this is not changing the library.

We need to be sure and be careful with this fork.  It needs to add genuine 
value, and not just be a fork for the sake of using "cool new features".  Note 
that the C++98 branch works just fine in a C++11 environment.

I think that some of the reasons people are asking for a C++11 version is 
because they don't like mixing boost::shared_ptr and std::shared_ptr.  We risk 
running into the same problem with boost::optional and boost::future.  
std::optional almost made it in to C++14.  I suspect something like it will 
appear in C++17.  std::future is already in C++11, so if we go with the boost 
version, then we will need some very strong rationale for that.

> C++11 generator
> ---------------
>
>                 Key: THRIFT-2717
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2717
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C++ - Compiler
>            Reporter: Konrad Grochowski
>
> instead of adding another set of options to 'old' cpp generator I've started 
> creating new one in:
> https://github.com/hcorg/thrift/tree/cpp11_generator
> using old as an reference
> main goals:
>  * no more ugly {{__isset}} structure -> boost::optional for optional values
>  * as a result - no more {{__}} in names, which violates C++ standard
>  * all generation code will have own unit tests (TDD used wherever possible)
>  * generated types headers independent from Thrift header, to allow other 
> layers of application using generated types without dependency leaks
>  * each type will generate own header/cpp file - easier for user to include 
> only used parts.
>  * unordered map/sets
>  * returning using move semantics, no more ugly 'return via output parameter' 
> (still possible as option thou - sometimes it's needed for performance)
>  * async client using boost::future
>  * enum classes
>  * initializer lists for constants (maybe)
> I'm aiming in C++11 subset available in gcc 4.8 and MSVC 2013
> currently I have only complete enum generation, but work is in progress
> all comments etc are very welcome :)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to