You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Nathan Marz (JIRA)" <ji...@apache.org> on 2009/07/29 22:46:15 UTC
[jira] Commented: (THRIFT-540) Have set methods return reference to
self
[ https://issues.apache.org/jira/browse/THRIFT-540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736819#action_12736819 ]
Nathan Marz commented on THRIFT-540:
------------------------------------
+1
> Have set methods return reference to self
> -----------------------------------------
>
> Key: THRIFT-540
> URL: https://issues.apache.org/jira/browse/THRIFT-540
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Java)
> Reporter: Nathan Marz
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.2
>
> Attachments: thrift-540.patch
>
>
> Sometimes its useful to be able to make a single or string of modifications to a thrift object inline. Having set methods return a reference to itself allows for syntactic sugar like this:
> myThriftObject.set_field1(...).set_field2(...)
> getObjectFromHelperMethod().set_field2(...)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.