Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] DOM's javascript roots (was Re: [xml-dev] Have JDOM / XOM / etc. failed?)

From: Tatu Saloranta <cowtowncoder@-----.--->
To: XML Developers List <xml-dev@-----.---.--->
Date: 4/4/2006 10:27:00 PM
--- 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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent