[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

  • To: XML Developers List <xml-dev@l...>
  • Subject: Re: DOM's javascript roots (was Re: Have JDOM / XOM / etc. failed?)
  • From: Tatu Saloranta <cowtowncoder@y...>
  • 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@e...>

dom encoding
--- 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.