Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Immutable Datastructures with good Sharing Date: Sat, 05 Nov 2011 18:16:14 -0400 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: <4839047.311.1320512815263.JavaMail.geo-discussion-forums@pref15> <24CdnZZfrM8C5SjTnZ2dnUVZ_qmdnZ2d@posted.palinacquisition> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 5 Nov 2011 22:17:02 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="HSlJAUb3pGXi3i7ZL/HoAw"; logging-data="24516"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/STkF6ID3UTVCJfD4xIsfw" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: Cancel-Lock: sha1:GgxX3XlFxZ1OkxoiLn2sGLRYeRg= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9625 On 11/5/2011 2:30 PM, Jan Burse wrote: > > But I am looking for: > > Some stack class, where: (Easy) > pop() creates a new immutable stack > push() creates a new immutable stack > With good sharing. This has already been answered: Build a tree. > Some queue class, where: (Hard?) > enqueue() creates a new immutable queue > dequeue() creates a new immutable queue > With good sharing. We're all still wondering why you want this one. Every time you've been asked, you've replied by talking about stacks, writing pseudocode for stacks, and just stacking it higher and higher. Why do you want an immutable *Q*U*E*U*E*? -- Eric Sosman esosman@ieee-dot-org.invalid