7,509 reputation
11244
bio website glenpeterson.blogspot.com
location United States
age
visits member for 1 year, 8 months
seen Mar 18 at 18:59

Java/Web Application Architect, Scala enthusiast, Clojure fan, seeker of knowledge.

The new "On Hold" feature of SE that gives people more of a chance to improve poorly worded questions before they are closed is sweet!


Mar
6
accepted Passing a Scala function to a Java 8 method
Mar
6
revised Passing a Scala function to a Java 8 method
added 4 characters in body
Mar
6
revised Passing a Scala function to a Java 8 method
added 47 characters in body
Mar
6
revised Passing a Scala function to a Java 8 method
added 666 characters in body
Mar
6
asked Passing a Scala function to a Java 8 method
Feb
14
revised Does 'consider returning Null Object' apply to a DAO read method?
added 58 characters in body
Jan
18
comment Weight-maximizing (weighted vertices) path algorithm
This question appears to be off-topic because reads like it is posting a homework question for other people to solve.
Jan
15
comment Why can't we use unique identifier as combination of email and password?
Social Security numbers are supposed to be unique, but they are not - turns out that the government makes some errors, and not everyone has one, and to fix errors, some people's social changes. Some people have dual citizenship with more than one social. Integer data types can pack more information per byte than any other. Surrogate keys FTW! en.wikipedia.org/wiki/Surrogate_key
Jan
6
awarded  Necromancer
Dec
24
accepted Why doesn't Java 8 include immutable collections?
Dec
23
awarded  Popular Question
Dec
19
comment Why doesn't Java 8 include immutable collections?
@Giorgio: 2 words: Legacy systems. When you have 10's or 100's of thousands of lines of Java code, it becomes very difficult to port it to the coolest new language that comes along. 3 years later when an even cooler newer language comes along, are you supposed to port it all over again? It's just not feasible. Functional programming brings great things to Java, even if Java doesn't bring such great things to it.
Dec
19
revised Why doesn't Java 8 include immutable collections?
It looked like I asked about Java providing only immutable collections, when really I meant to ask about ADDING immutable collections to the existing API (leaving the mutable ones alone) so I rephrased to clarify.
Dec
19
awarded  Nice Question
Dec
19
comment Why doesn't Java 8 include immutable collections?
Couple problems. The collections in Clojure and Scala are both immutable, but support light-weight copies. Adding element 1001 means copying less than 33 elements, plus making a few new pointers. If you share a mutable collection across threads, you have all kinds of synchronization issues when you change it. Operations like "remove()" are nightmarish. Also, immutable collections can be built mutably, then copied once into an immutable version safe to share across threads.
Dec
18
revised Why doesn't Java 8 include immutable collections?
added 1 characters in body
Dec
18
comment Why doesn't Java 8 include immutable collections?
I read your answer again and I think you are saying that Java has a fundamental assumption of mutability (e.g. java beans) and that the collections are just the tip of the iceberg and carving off that tip won't solve the underlying problem. A valid point. I might accept this answer and speed up my adoption of Scala! :-)
Dec
18
comment Why doesn't Java 8 include immutable collections?
My example talked about immutable interfaces. Java could provide a full suite of both mutable and immutable implementations of those interfaces that would make the necessary trade-offs. It's up to the programmer to choose mutable or immutable as appropriate. Programmers have to know when to use a List vs. Set now. You generally don't need the mutable version until you have a performance issue, and then it may only be necessary as a builder. In any case, having the immutable interface would be a win on its own.
Dec
18
revised Why doesn't Java 8 include immutable collections?
Incorporated Karl's insights about Scala laziness.
Dec
18
comment Why doesn't Java 8 include immutable collections?
@KarlBielefeldt - Sweet!!! I've been wondering how to do that! I'll have to look into that in more depth soon...