|
|
John VanSickle wrote:
> Some class designers would make most of the member functions in class
> PrintJob return a reference to the class so that this could be one line:
>
> job.initialize().orient(landscape).copies(2).paper(A4).print();
Yeah. The person I saw advocating this also recommended command/query
separation, so anything that sets a parameter wouldn't be able to return a
value. It would be interesting to know what he'd think of this sort of
chaining, tho, which doesn't seem to violate the spirit of C/Q.
--
Darren New, San Diego CA, USA (PST)
"Ouch ouch ouch!"
"What's wrong? Noodles too hot?"
"No, I have Chopstick Tunnel Syndrome."
Post a reply to this message
|
|