[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: JavaScript (was Re: Whither XML ?)

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 12 Nov 2010 00:26:48 +0000

Re:  JavaScript (was Re:  Whither XML ?)
 >Sorry, but I think this is nonsense.  It's a popular theory among 
users of strongly-typed language, but it doesn't stand up to real world 
examination.  Plenty of very large, very complex systems are written in 
weakly typed languages, and I do not think there is good evidence that 
these are more buggy than those that aren't.  Typing is just one sort of 
constraint, and it's a generally artificial type that rarely matches 
real world constraints.

I don't have any personal experience of writing large systems in 
Javascript, but the argument Steven Pemberton made this morning sounded 
very plausible, and certainly aligns with my experience of helping users 
debug large XSLT applications, where it is definitely the case (in my 
experience) that adding type declarations to variables and parameters 
will often detect errors at compile time, and failing that, will detect 
them at run-time somewhere close to the point where the code is wrong, 
in cases where without the type declarations, the effect is often that 
the stylesheet doesn't fail, but merely produces incorrect output or 
sometimes no output. [Sorry for the length of that sentence.] It also 
aligns with my experience in Java where a large proportion of the bugs I 
write manifest themselves as compile-time type errors, and where code 
that compiles without error often then works first time. I just 
sometimes wish Java did stricter static checking, for example checking 
that a method signature is consistent with the method it was intended to 
override (the @Override directive is optional, just as type declarations 
are in XSLT, and it's definitely good programming practice to use it.)

Michael Kay
Saxonica


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.