[
https://issues.apache.org/jira/browse/THRIFT-1876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598318#comment-13598318
]
Jens Geyer commented on THRIFT-1876:
------------------------------------
I am going to commit this at Wednesday unless there is any other opinion until
then.
> Use enum names instead of casted integers in assignments
> --------------------------------------------------------
>
> Key: THRIFT-1876
> URL: https://issues.apache.org/jira/browse/THRIFT-1876
> Project: Thrift
> Issue Type: Improvement
> Components: Delphi - Compiler
> Reporter: Jens Geyer
> Assignee: Jens Geyer
> Fix For: 1.0
>
> Attachments:
> THRIFT-1876_Use_enum_names_instead_of_casted_integers_in_assignments.patch
>
>
> Same as in THRIFT-1318 with C#.
> It makes more sense to write
> {code}
> Self.Property = TMyEnumType.SomeValue;
> {code}
> instead of the C-ish casting style like in
> {code}
> Self.Property = TMyEnumType(-42);
> {code}
> And since it seems not to be possible to assign values other than the
> IDL-defined enum values, there is no reason left to use the cast.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira