You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Scott Ananian" <ca...@lesser-magoo.lcs.mit.edu> on 2001/11/30 19:10:12 UTC

Re: [SVN-DEV] PUBLIC POLL: final static

[delurking]

+1 accessors.

*Every* reasonable java implementation in this day and age should inline
simple accessor methods.  [Those that don't are far too slow to be
competitive.]  Using accessor functions future-proofs your implementation
by allowing you to extend the accessor, etc, without forcing an API change
on all of your clients.

The other consideration is that "A.foo" is usually a lot cleaner-looking
than "A.foo()", but that's just because Java chose to ignore history.
Many (most?) object-oriented languages have recognized that using the same
syntax for field accesses and message sends allows the implementation to
change from a field representation to an accessor method withohut forcing
the above-mentioned API change on clients.  If that were the case for
Java, I'd be voting for fields.
 --s

SEAL Team 6 COBRA JANE [Hello to all my fans in domestic surveillance] 
Philadelphia postcard Saddam Hussein affinity group FBI pending Ortega 
              ( http://lesser-magoo.lcs.mit.edu/~cananian )


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org