Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Jan Burse Newsgroups: comp.lang.java.programmer Subject: Re: Immutable Datastructures with good Sharing Date: Sat, 05 Nov 2011 12:42:13 +0100 Organization: albasani.net Lines: 33 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.albasani.net rSaevOkHAlL/X+Lcdc5DNqJGk238Qe6HOj12gczp3dlrKk3gshfUduROyFjIsvMDjF3eVGOKZkvtobb3DrK+ww== NNTP-Posting-Date: Sat, 5 Nov 2011 11:42:18 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="NPODSt2ExUqrHLT9+NfjICq+JPzmuUszBv5ji1FVfwdglfT/srY34i8BIyhWcpOzkv2pc9F73JoOOm1XuIfY9zecDFAAx6ENgmjWgkdFQiUoWYS0YQjudWWtqXyEuJNL"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1 In-Reply-To: Cancel-Lock: sha1:U1FQhtSujC1y9I4OYrclczS/NaU= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9566 Stefan Ram schrieb: > However, in computer science, a stack is well known as a > specific mutable entity with specific performance > properties. So, an »immutable stack« should not be called > »stack«. If you take the subdomain of functional programming in computer science, the people there wouldn't probably agree. A stack can be viewed as an abstract datatype: push : Stack x Element -> Stack pop : Stack -> Stack x Element | Fault By the above one would loose the possibility to directly reference a stack by one process. And then see what an another process is doing on it. I am interested in functional programming like implementations of a stack in Java. That show good sharing. I know for example of the functional Java project: http://functionaljava.org/ I could eventually use something like HList from there. But these classes are highly parameterized and I don't know whether good Sharing was on their primary focus. The interesting case is the Queue. Best Regards