POV-Ray : Newsgroups : povray.off-topic : C# 4.0 Default parameters : Re: C# 4.0 Default parameters Server Time
9 Oct 2024 16:07:59 EDT (-0400)
  Re: C# 4.0 Default parameters  
From: Darren New
Date: 5 Feb 2009 22:04:56
Message: <498ba8d8@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.