[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|