ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <>
Subject Re: XJ - xml extension for Java
Date Sat, 09 Jul 2005 05:32:06 GMT
Kev Jackson wrote:

>> 1. I wish jikes would move up to 1.5; my life is spent waiting for 
>> things to compile again.
> I've skipped Java 1.5 for various reasons:
> 1 - the 'enhanced for loop' is just crap
> 2 - I've not needed generics, I actually have no need for one of the 
> major features of the language, maybe I could change all my code so 
> that the collections are aware of the type of data they contain, but 
> I'm used to the 'old' way and it's no bother [shrug]

How *anyone* does not need generics is beyond me.  This is *huge* in my 
book.  The amount of silly double-checking I can avoid by knowing the 
compiler has done this checking for me is immediately worthwhile.  Being 
able to type:

    public void  doIt( Map<String,Map<String,Collection<Bar>>> foo );

rather than:

    public void  doIt( Map foo );

along with a huge Javadoc comment to try to explain that the type is 
reall 'Map<String,Map<String,Collection<Bar>>>' without assuming that 
the readers even understand generic syntax is also immediately 
worthwhile.  Worse, I've seen entire collections of classes created 
simply to wrap collections and give them strong types...  [Yes, the data 
structure above is contrived, but similar or even more complex 
structures arise quickly and commonly enough.]

> 4 - annotations, these seem to be in place for EE/EJB development and 
> I'm using hibernate and spring.  Sure I could use them to declare 
> interfaces etc, but I'm genuinely ok with the old way

I already have make heavy usage of annotations for JMX -- which is the 
other big reason for Java 5: built-in support for JMX and JSR 160 
(rather than the ugly mish-mash of generally proprietary JMX 
communication protocols that proceeded this).

> 6 - Jikes doesn't support it, WebLogic doesn't support it (then 
> WebLogic barely supports Java)

This is a reason to stop using Jikes!  Seriously if the tool holds you 
back from the latest technology and there is an equally workable tool 
out there, then stop using it.  Jikes may be faster than javac, but 
that's not the bottleneck on my productivity.

>> 2. <> looks ugly in generics; it should stay in XML where it belongs. 
>> Maybe that shows the price of copying c++ too slavishly (except I 
>> still think they should haved stuck to bool instead of boolean)
This makes it more readable to more people.  XML-isms (i.e. usage of 
<tag>, xxx="yyy", and & for non-"and" operations) should stay in XML and 
not in Java in my book, though.

Jess Holle

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message