It's really nice for building DSLs and generators:

<cfset gennedObject=   
object 
(attribute 
("name 
","name 
"),attribute 
("hint 
","hint 
")).function 
(attribute 
("name 
","name 
"),attribute 
("hint 
","hint 
")).argument 
(attribute 
("name 
","name 
"),attribute 
("hint","hint")).body(string(...).function("close").object("close")>

As this collapses, it creates the strings it needs from the values  
supplied and prepends them to an array. Interestingly, it creates them  
backwards, from object("close") to object(). ;)

J

On Feb 10, 2009, at 6:17 PM, Alan Livie wrote:

> MxUnit's Billy shows a nice use for method chaining when building  
> expressions:
>
> http://blog.mxunit.org/2009/01/fluent-paradigm-for-refactoring.html
>
> Its a good read!
>
> Alan

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