Hehe - great reply!

I really don't like seeing code like:

totalcost = instance.basecost + getBookingFee();

where I have an existing public getBookingFee() method but no getBaseCost
method, so I end up creating getters and setters via a snippet. Good to know
you have the same dilemmas as me :)


On 25 February 2010 13:21, Jared Rypka-Hauer <[email protected]>wrote:

> I think they fixed that in like beta 2 or something... Bob, you should try
> to keep up a bit more. ;) Just teasing.
>
> That said, I always find it entertaining when I make some pronouncement
> about how CF needs this or that to work right and someone runs code that
> shows me up... it reminds me that nobody really knows everything (despite
> their insistence to the contrary heh).
>
> As for the original question, in theory I find myself preferring to use
> instance data over getters, especially private getters... and yet the OCD
> side of me can't stand having a setter without its getter, and if there's a
> method I must call it rather than referring to variables directly. ;) So in
> practice I end up using private getters.
>
> The performance hit for them is minimal, I have an Eclipse snippet for
> generating the get/set pair almost instantly, and in the long run having
> that getter there makes it much easier to refactor since you can just change
> the getter without having to change a bunch of references too. I "get" the
> idea of using instance data directly, it just doesn't sit as well as the
> alternative...
>
> J
>
> On Feb 16, 2010, at 8:48 AM 2/16/10, John Whish wrote:
>
> Cool! I only found that out as I was giving someone a tour of the new CF9
> features and was waiting for it to throw an error because they hadn't used
> "this." and it worked! :)
>
> On 16 February 2010 14:21, Bob Silverberg <[email protected]>wrote:
>
>> Holy crap, you're right, John! ...
>
>  --
> 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]<cfcdev%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/cfcdev?hl=en.
>

-- 
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.

Reply via email to