• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getters without the "get" part
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getters without the "get" part


  • Subject: Re: Getters without the "get" part
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 31 Mar 2009 14:19:03 -0400

Can I ask why WO as a whole doesn't use the 'get' prefix?
It is a silly Java hack for JavaBeans. It adds no value to the method name, just makes it longer. It makes it harder to parse a list of methods as so many are named get...
... or .... it makes it easier to see the accessor methods as separate from non-accessor methods and makes a symmetric "get" accessor API to the "set" mutator API. This is especially confusing when you have properties where the noun form is a homonym of a verb, and it becomes non-obvious whether you are performing an action or calling a (typically) idempotent accessor. And you're really not going to call out "long names" when your primary framework is WebObjects, right? Don't make me bust out my list of crazy long method names in WO. I have completion -- what do I care if it's one extra character to do the complete in exchange for clarity.

It seems to me that most people I talk to that like the non-get form are from Objective-C and most people who are annoyed by it are WO converts from traditional Java. To me, WO's lack of getXxx (along with its proprietary collections API, though I've come to love the immutable collections interface) make WO feel that much more "out there." But I've been doing it so long now (I decided to not rock the boat in 2004) that I'm mostly used to it, but I do think it only hurts code clarity.

ms

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Getters without the "get" part
      • From: Anjo Krank <email@hidden>
References: 
 >Re: Getters without the "get" part (From: Chuck Hill <email@hidden>)
 >Re: Getters without the "get" part (From: TW <email@hidden>)
 >Re: Getters without the "get" part (From: Simon McLean <email@hidden>)
 >Re: Getters without the "get" part (From: Chuck Hill <email@hidden>)
 >Re: Getters without the "get" part (From: Dan Grec <email@hidden>)
 >Re: Getters without the "get" part (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Getters without the "get" part
  • Next by Date: Re: Getters without the "get" part
  • Previous by thread: Re: Getters without the "get" part
  • Next by thread: Re: Getters without the "get" part
  • Index(es):
    • Date
    • Thread