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

Konrad Grochowski commented on THRIFT-2717:
-------------------------------------------

having both c + + (new) and cpp (old) folders/libs/compiler options might be 
confusing for users

I'd prefer to rename existing compiler to cpp98 and make new one as cpp and 
keep it up to date with new c+ + specs as they appear (probably nothing that 
huge like 98 vs 11 will happen in foreseeable future). But that would break 
backward compatibility and it's hard for me to suggest it ;)

current library still looks pretty good in C++11 (maybe just boost::shared_ptr 
--> std::shared_ptr would be nice) and I hope I'll be able to generate C++11 
nice code which will work with current lib.

If I'll succeed with C++11 compiler then maaaaybe I'll think about changes in 
library. But first I think than my new "full of tests" approach will ease 
adding some options to generate code compatible with fbthrift ;)

> 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