OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] DOM's javascript roots (was Re: [xml-dev] Have JDOM / XOM

[ Lists Home | Date Index | Thread Index ]
  • To: XML Developers List <xml-dev@lists.xml.org>
  • Subject: Re: [xml-dev] DOM's javascript roots (was Re: [xml-dev] Have JDOM / XOM / etc. failed?)
  • From: Tatu Saloranta <cowtowncoder@yahoo.com>
  • Date: Tue, 4 Apr 2006 15:29:30 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=LBbCVyvZ4yM2RevN37OK7A0u2UFURMNm/3+K1tek/Gofx3kizFKhMTTnWqp1apazVr8SuMtcvLWupN0f093o6QupOozkVFWYowUnAPolPBdsim20aOV46UlDhx+KiJuaqb/PMSlux16Aw7dxS4E2ut7JLggTbDv8ZSXdVMiz3H8= ;
  • In-reply-to: <72500FAE-0CC9-4D59-8321-767A02859A4B@expway.fr>

--- Robin Berjon <robin.berjon@expway.fr> 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 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS