× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



From: David Gibbs

Joe Pluta wrote:
And I'm not arguing about whether you should or shouldn't access member
variables; I prefer setters and getters myself. And while the getter is
pretty much a spelling issue (x = myvar *VS* x = getMyvar()), the setter
is
a philosophical issue as well. Does "myvar = x" really indicate that
you
are calling something as well as "setMyvar(x)"? That's up to you.

Well, I would have to both agree (with your thoughts in general), but
disagree with the importance of getters/setters vs. member access.

Sorry, I wasn't clear. When I said (x = myvar *VS* x = getMyvar()), , I
wasn't talking about getter/setter vs. member access, I was talking about
.NET syntax for calling a getter vs. Java syntax.

Unless I'm mistaken, in .NET, x = myobj.myvar on a property will
automatically invoke the Get method for that property. So, when I'm looking
at a line of code that says x = myobj.myvar, I don't really know whether I'm
calling a setter or not.

And as I noted, it's far less of an issue with the getter than it is with
the setter, because the syntaxes are completely different:

myobj.myvar = x

Instead of

myobj.setMyvar(x);

Joe


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.