[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: DOM's javascript roots (was Re: Have JDOM / XOM
--- Robin Berjon <robin.berjon@e...> wrote: ... > exception. It is the idiomatic equivalent to the > somewhat less > idiomatic: > > import java.io.*; > //... > try { > Writer out = new OutputStreamWriter(new > FileOutputStream > ("file.txt"), "UTF-8"); > } > catch (IOException ioe) { > throw new RuntimeException("Error opening file: " > + ioe.getMessage > ()); > } > > except that by its simplicity it tends to be more > inviting to do the right thing. Nah. Idiomatic way would be declare the exception and let it trickle through the invocation method (infamous main()). But you still didn't point out how Perl equivalent is supposed to be superior. Having odd notation for specifying encoding (that magic place for "utf-8") hardly seems superior to Java: in both cases you can omit the explicit encoding declaration, and get something you generally don't want. I fail to see the huge deficiencies of JDK APIs in this example (or the other ones included): Java is not designed for single-line scripting. Perl (and host of other languages is). So why do you insist on "proving" suckiness of JDK via examples that are things one very rarely uses Java for? -+ Tatu +- __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|