[plt-scheme] representing environments in Java

From: Thomas Chust (chust at web.de)
Date: Tue Feb 3 04:25:53 EST 2009

John Clements wrote:
> [...]
> This seems like a ludicrous state of affairs: the standard libraries
> fail to contain any way to represent functional-update lists, despite
> the fact that such a thing would be about a hundred lines of extra code
> in a very large standard library. Surely I must be overlooking something
> obvious?
> [...]

Hello,

you're not overlooking anything, the Java standard library indeed
contains no general purpose immutable, functional update collections of
any kind. It is only possible to create unmodifiable views of the
standard mutable collection classes through static methods of
java.util.Collections.

There are a few libraries, though, that provide immutable collections --
for example Functional Java (http://functionaljava.org/) or the runtime
libraries of programming languages like Clojure (http://clojure.org/) or
Scala (http://www.scala-lang.org/).

cu,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.