On Sun, Mar 14, 2010 at 3:08 AM, Sean Corfield wrote: > Just catching up on some old threads because I've been crazy busy lately... > > On Mon, Feb 15, 2010 at 6:44 AM, John Whish wrote: >> Would you create and use a private getter and setter for mutating >> "foo"? > > No. I avoid getters/setters as much as possible since they essentially > break encapsulation and I never use private getters/setters at all - I > see no point. ... > > *dons flame-retardant suit*
So busy, and yet you're out trolling? ;) I think that this is one of those deals where sweeping generalizations don't really work, so I'll go ahead and bite. I'd say a [g|s]etter could help with encapsulation, like say for with a DAO who's data field names change a lot (first_name, firstName, fname...). Could help an IDE that wasn't all hip to javadoc-type stuff, too. Are you just *etting strings and such, or "objects" and what have you? What about AOP type stuff? Maybe that fine grained detail will come in handy... And really, one reason I'm working on CFE, is that a decent IDE, can make a lot of this crap a mute (er, moot!) point: Click, click, boom! :DeN -- A whole army, though they can neither write nor read, are not afraid of a platform, which they know is but earth or stone; nor of a cannon, which, without a hand to give fire to it, is but cold iron; therefore a whole army is afraid of one man. James Harrington -- You received this message because you are subscribed to the Google Groups "CFCDev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en.
