XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] JavaScript (was Re: [xml-dev] 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]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS