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

Jake Farrell commented on THRIFT-1876:
--------------------------------------

Patch looks good, go ahead and commit
                
> 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

Reply via email to