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

Itamar Syn-Hershko commented on LUCENENET-470:
----------------------------------------------

Yes, I followed it to some extent, although not closely enough.

I don't want to reopen the discussion here. For me, it was quite comfortable 
moving between the Java and .NET codebases. Being of the CLucene core team, I 
can also tell you this has tremendous effect on users and on your ability to 
keep up with the Java version.

The looks of a foreach loop doesn't really matter IMO, but function names 
usually do. This is why I think it should only be done when it brings more 
performance.

But as long as you're aware of this and doing this carefully, I'll just let it 
be.
                
> Change Getxxx() and Setxxx() methods to .NET Properties
> -------------------------------------------------------
>
>                 Key: LUCENENET-470
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-470
>             Project: Lucene.Net
>          Issue Type: Sub-task
>          Components: Lucene.Net Contrib, Lucene.Net Core
>    Affects Versions: Lucene.Net 2.9.4, Lucene.Net 2.9.4g, Lucene.Net 3.0.3
>         Environment: all
>            Reporter: Christopher Currens
>             Fix For: Lucene.Net 3.0.3
>
>
> We should use .NET properties where ever possible.  There are many methods in 
> the API that use methods similar to {{Class.Getxxxxx()}} or 
> {{Class.Setxxxxx()}}.  These methods often just return a less-accessible 
> field, with no real logic behind it.
> * If there are both public Get/Set methods with no special logic, they can be 
> turned into an automatic property: Name { get; set; }
> * If there are both Get/Set methods with no special logic and the setter is 
> private, use an automatic property: Name { get; private set; }
> * In other cases, use good judgement based with the amount of logic that is 
> present in the getter and setter methods.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to