The Benefits of Static Typing

Writing reliable software is hard. It is not difficult to write programs of several dozen or even hundreds of lines of code without bugs. But writing large applications is a difficult job even for the most experienced developer. Although many large applications are written in scripting languages such as Javascript and Perl, programmers debug such applications almost entirely at run-time, because scripting languages provide few compile-time checks. Most modern compiled languages (Java, C++, C#, ML, Haskell, etc.) provide static typing to help build large, reliable applications. Static typing can help by detecting common type errors in a program during static analysis so that they can be handled instead of being discovered ...

Get XQuery from the Experts: A Guide to the W3C XML Query Language now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.