Archive for 10th November 2008

Iterating through Properties in Java 1.5 is just not right!

I love Java 1.5isms like foreach. It makes me yearn somewhat less for languages like Ruby, Python, and PHP. It makes it so I do not feel itchy when I code in Java. Also I am moving towards Properties instead if Map<String,String> because it seems more “native” – but it is just ugly to iterate through a Properties object in Java:

Properties props ...
for(Object okey : props.keySet() ) {
String key = (String) okey;  // Creepy

What is up with that? And the leys() method returns an Enumeration which does not work with the foreach. What is up with that?

Reaction to Michael’s Blog Post

I am loving the discourse around this topic – I like the fact that there are many voices – lets keep talking about this and really explore and understand these issues. Regardless of the outcome – the more we as a community understand about our governance – the better off we are we are. Here is Michael’s Blog Post. My response is below.

Continue reading ‘Reaction to Michael’s Blog Post’ »