Ben I will try to assist. A soon you make I patch I will check on other sdks.
Quoting Ben Caradoc-Davies ben.caradoc-dav...@csiro.au:
On 24/06/10 20:53, christian.muel...@nvoe.at wrote:
H i Ben, this discussion stopped without a result. What are your
next steps ?
No, it stopped with the
My next step will be to submit bug fixes for the most egregious HashMap
assumptions, referring to this discussion.
looks like the right thing to do imho.
Cheers!
Gabriel
--
ThinkGeek and WIRED's GeekDad team up for
H i Ben, this discussion stopped without a result. What are your next steps ?
This message was sent using IMP, the Internet Messaging Program.
--
On 24/06/10 20:53, christian.muel...@nvoe.at wrote:
H i Ben, this discussion stopped without a result. What are your next steps ?
No, it stopped with the result that my proposal to avoid HashMap was
rejected.
Blame has been fairly laid at the feet of anyone who expects stable
iteration order
Nothing wrong with HashMap - not a weakness - its behaviour is
implicit in the hashing algorithm. Its simply using the wrong tool for
a job :-)
The problem with observation is you see what you want to see, Grasshopper :-)
Modern programmers learn about frameworks - old fashioned ones with
Jody Garnett ha scritto:
Can we arrange for maven to yell at us when HashMap is used?
Ben I have been known to use a couple of the other Map
implementations; such as ConcurrentHashMap (and we also have our own
WeakHashMap) - we may need to check if these implementations suffer
the same
On 15/06/10 15:50, Andrea Aime wrote:
Developer depending on hashmap order - chaos
It's not the fault of poor hashmap that developers use it in a number
of places where it's unnecessary if not even harmful.
But the poor developers cannot know if they are getting a HashMap if
they are a
On 15/06/10 16:17, Andrea Aime wrote:
I still see an incompetent developer in action there.
You look at that interface, you get a Map, so you know:
- the API designer decided the iteration order was not important
- the iteration order cannot be trusted
Many other Map implementations have
Ben Caradoc-Davies ha scritto:
On 15/06/10 16:17, Andrea Aime wrote:
I still see an incompetent developer in action there.
You look at that interface, you get a Map, so you know:
- the API designer decided the iteration order was not important
- the iteration order cannot be trusted
Many
On 15/06/10 16:45, Andrea Aime wrote:
I would not blame Alice for Bob lack of skill (or simple oversight).
She exposed a Map and made no promises on ordering, Bob took it and
promised what he could not deliver.
How does finger pointing between Alice and Bob help Carol? A bit of
defensive
Ben Caradoc-Davies ha scritto:
On 15/06/10 16:45, Andrea Aime wrote:
I would not blame Alice for Bob lack of skill (or simple oversight).
She exposed a Map and made no promises on ordering, Bob took it and
promised what he could not deliver.
How does finger pointing between Alice and Bob
I think like Andrea, filling an ordered collection from an unordered
one needs an explicit ordering criteria, otherwise it is nonsense.
There is nothing bad about using a HashMap, a set has an exact
definition as we all know from mathematics in school (I hope so :-))
Unfortunately, as we
+1 for Andrea and Christian.
--
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
On Tue, Jun 15, 2010 at 10:35 AM, Mª®k mc.pr...@gmail.com wrote:
+1 for Andrea and Christian.
+1 from me too - When I learnt about maps and lists I was taught they
do different things and to be clear about which I needed.
Ian
--
Ian Turton
I have to add my +1 as well. We have run up against this before when we
started supporting java 6 and the moral of the story was that it is up
to the downstream developer to ensure that if they are iterating through
a map in a case where order matters then the onus is on them to ensure
they
+1 to good discussion here. Good read for me.
I think I agree with how developers should really know what they are
doing. I bet we all have experienced times where we wish people using
our functions use them properly.
However, I think Ben still has a point in being DEFENSIVE. I agree
with Ben
On 6/15/10 3:56 PM, lim goh wrote:
+1 to good discussion here. Good read for me.
I think I agree with how developers should really know what they are
doing. I bet we all have experienced times where we wish people using
our functions use them properly.
However, I think Ben still has a point
I guess we fell back to the definition of defensive, I don't know a
good replacement word for it, but what I wanted to say is:
1. Using Map as a return type is completely valid, good, should, defensive...
2. Consumer who expects specific implementation detail is wrong, bad,
should not.
3. The
On 16/06/10 03:49, Gabriel Roldan wrote:
So, being certain that most probably I introduced some of this problems
myself by having worked on the app-schema code years ago, I still
strongly argument against anyone that expects a given iteration order
out of a method returning a Map
Gabriel,
Ben is right here. The problem is spread over all geotools/geoserver
tests. As I started with geotools/IBM SDK I fixed a lot of tests
having this problem.
At the moment, there are some tests which are not easy to fix for me.
I am not sure if the library should pass back an ordered
[This affects GeoServer too, but I'd rather avoid a cross-list post.]
Synopsis:
- HashMap has platform-dependent iteration order.
- Use LinkedHashMap to make iteration order consistent across platforms.
- Same rule applies for HashSet: replace with LinkedHashSet.
HashMap uses key hashCodes to
Can we arrange for maven to yell at us when HashMap is used?
Ben I have been known to use a couple of the other Map implementations; such as
ConcurrentHashMap (and we also have our own WeakHashMap) - we may need to check
if these implementations suffer the same weaknesses as HashMap.
Jody
On
On 15/06/10 13:25, Jody Garnett wrote:
Can we arrange for maven to yell at us when HashMap is used?
I do not think we should do this ,as there are legitimate occasions
where HashMap may be used for performance, particularly when we have
many insertions, one iteration, and iteration order is
23 matches
Mail list logo