[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: JavaScript (was Re: Whither XML ?)
On Thu, Nov 11, 2010 at 5:26 PM, Michael Kay <mike@saxonica.com> wrote: >>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.) I personally suspect that it's the same inclinations of the programmer that lead Java to suit them that mean that it so happens that they perceive Java as being useful in squashing the sorts of bugs they are prone to generate. But weakly typed languages have been growing in popularity very rapidly recently, and there are many people (including me) who have plenty of the experience you admit you lack. There is enough of a body of such work that if such systematic problems did exist, it would be quite clear by now. But I am not really interested in this, which is one of the longest-running, most heated debates in programming. If I'm pressed on the matter I'll refer back to this very list several years ago when I railed against the encroachment of strong bondage & discipline typing into XML technologies. I'm surprised Steve stuck his neck out on the matter. I'd think he'd know better. The reality is that everyone argues that the style of programming they prefer is the style which is more likely to produce high-quality code. If we were silly enough to take this to some alt.lang.flamewar, where it belonged, it would be about 5 seconds to the first LISP programmer telling us we were all producing equally rubbish code. This all started because someone told you "why don't you use JavaScript." It's perfectly legitimate for you to say "because I don't want to" or even "because I don't like it". I've always hated any imperative that drives programmers to use languages they dislike. But instead you trotted out a contentious and in my opinion disreputable chestnut to disparage JavaScript. I just don't think that's productive. -- Uche Ogbuji http://uche.ogbuji.net Weblog: http://copia.ogbuji.net Poetry ed @TNB: http://www.thenervousbreakdown.com/author/uogbuji/ Founding Partner, Zepheira http://zepheira.com Linked-in: http://www.linkedin.com/in/ucheogbuji Articles: http://uche.ogbuji.net/tech/publications/ Friendfeed: http://friendfeed.com/uche Twitter: http://twitter.com/uogbuji http://www.google.com/profiles/uche.ogbuji
[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
|