🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.objects
Article #14734

Re: "setter" zwracający obiekt

#14734
From: a1
Date: Thu, 08 Jun 2006 07:27
36 lines
2249 bytes
Seweryn Habdank-Wojewódzki wrote:
> Witam
> 
> a1 wrote:
> 
> 
>>Order o1 = new Order();
>>        customer.addOrder(o1);
>>         OrderLine line1 = new OrderLine(6, Product.find("TAL"));
>>         o1.addLine(line1);
>>         OrderLine line2 = new OrderLine(5, Product.find("HPK"));
>>         o1.addLine(line2);
>>         OrderLine line3 = new OrderLine(3, Product.find("LGV"));
>>         o1.addLine(line3);
>>         line2.setSkippable(true);
>>         o1.setRush(true);
>>
>>vs.
>>
>>         customer.newOrder()
>>                 .with(6, "TAL")
>>                 .with(5, "HPK").skippable()
>>                 .with(3, "LGV")
>>                 .priorityRush();
> 
> 
> To jest tendencyjna konstrukcja. 
Troche tak, wykozystalem przyklad bezposrednio ze strony Flower'a, ktory 
mial pokazac ze metod chaining moze byc calkiem przyjemny w odbiorze.
Ja nie twierdze ze to lek na cale zlo, ale moze byc uzyteczny (i 
cztelny) podczas gdy wiekszosc moich przedpiscow odrzuca ten pomysl, 
mimo ze nigdy nie uzywali w praktyce tego typu interfejsow. Z mojej 
strony to tyle bo nawracac nikogo nie mam  zamiaru.

-- 
a1 (Bartek Janusz) arcone1 gmail com
Technical Details
Message-ID: <e68jh7$bue$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
References: <e64lni$6bn$1@news.onet.pl> <e660l7$kgd$1@opal.icpnet.pl> <e665r3$adm$1@news.task.gda.pl> <e66afs$che$1@inews.gazeta.pl> <e66dmr$q62$1@inews.gazeta.pl> <e66joh$p6i$1@inews.gazeta.pl> <e66l9m$2j1$1@inews.gazeta.pl> <e6735n$dsj$1@tkdami.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: a1 <a1@no.spam>
Newsgroups: pl.comp.objects
Subject: Re: "setter" zwracający obiekt
Date: Thu, 08 Jun 2006 09:27:34 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 36
Message-ID: <e68jh7$bue$1@inews.gazeta.pl>
References: <e64lni$6bn$1@news.onet.pl> <e660l7$kgd$1@opal.icpnet.pl> <e665r3$adm$1@news.task.gda.pl> <e66afs$che$1@inews.gazeta.pl> <e66dmr$q62$1@inews.gazeta.pl> <e66joh$p6i$1@inews.gazeta.pl> <e66l9m$2j1$1@inews.gazeta.pl> <e6735n$dsj$1@tkdami.pl>
Reply-To: a1@no.spam
NNTP-Posting-Host: nat-plk.mentorg.com
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1149751655 12238 139.181.144.34 (8 Jun 2006 07:27:35 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 8 Jun 2006 07:27:35 +0000 (UTC)
X-Accept-Language: en-us, en
X-User: arcone1
User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
In-Reply-To: <e6735n$dsj$1@tkdami.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit