> Personally I really hate the notion of chaining setter calls (but I can
> see
> way others may like it).  I do find that much harder to read.
> 
> But other chaining is great.
> 
> Being able to chain the create and the init() together  seems perfectly
> sound to me.  As does any call which returns a CFC as a property then
> calls
> a property of that return as in something like this:
> 
> <cfset Name = Session.SessionCFC.getUserCFC().getName() />

I agree. I was only referring to setter methods (though I may not have been
very clear about that). In the above example, you're using getters. A
getter's purpose is to return something. Conseqently, the purpose of the
line above seems very clear to me.

This is in contrast to an example posted by Sean in another thread:

  person.setFirstName("Sean").setLastName("Corfield")

I find it more difficult to read. I would be very surprised if it were any
faster than two lines of code. So, I was wondering if there were any other
benefits or tricks that I'm missing.

Ben Rogers
http://www.c4.net
v.508.240.0051
f.508.240.0057


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188925
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to