[
https://issues.apache.org/jira/browse/THRIFT-2513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14131244#comment-14131244
]
Konrad Grochowski edited comment on THRIFT-2513 at 9/12/14 8:24 AM:
--------------------------------------------------------------------
IMHO: enums should be checked with namespaces. {{add_constant("Foo.One");}}
should be called, just in case.
If somebody uses cpp:pure_enums option, which uses ugly language feature
(global namespace pollution...) then one will get compile error and should know
(assuming one knows C++) to switch to "enums in structs". If it's possible -
maybe error or warning on generation level should be emitted - only when
pure_enums option is enabled in cpp generator.
Best solution would be to remove pure_enums, as they are ugly ;) But backward
compatibility...
Question remains - are there any other languages supported by thrift that
pollute global namespace with enum constants... (c_glib generator? I've never
looked into that one)
was (Author: hcorg):
IMHO: enums should be checked with namespaces. {{{add_constant("Foo.One");}}}
should be called, just in case.
If somebody uses cpp:pure_enums option, which uses ugly language feature
(global namespace pollution...) then one will get compile error and should know
(assuming one knows C++) to switch to "enums in structs". If it's possible -
maybe error or warning on generation level should be emitted - only when
pure_enums option is enabled in cpp generator.
Best solution would be to remove pure_enums, as they are ugly ;) But backward
compatibility...
Question remains - are there any other languages supported by thrift that
pollute global namespace with enum constants... (c_glib generator? I've never
looked into that one)
> clean up enum value assignment
> ------------------------------
>
> Key: THRIFT-2513
> URL: https://issues.apache.org/jira/browse/THRIFT-2513
> Project: Thrift
> Issue Type: Sub-task
> Components: Build Process, C++ - Compiler, C++ - Library, Test Suite
> Reporter: Roger Meier
> Assignee: Jens Geyer
> Fix For: 0.9.2
>
> Attachments: THRIFT-2513-clean-up-enum-value-assignment.patch,
> pure_enums.patch
>
>
> ticket for pull request 88
> https://github.com/apache/thrift/pull/88
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)