Guest editors’ introduction
暂无分享,去创建一个
practical uses of such languages and shows how they're frequently a vehicle for innovation in the development sphere. What is a dynamically typed language? Simply put, a dynamically typed language doesn't require the user to statically specify types—for example, no declarations of int i, and so on. However, this doesn't mean that such languages are weakly typed. If, for example , a user tries to add a string to a bool at run-time, an error will immediately be raised. Statically typed languages enforce the declarations of (at least a minimum of) types and notify the user at compile time of type-related errors that must be fixed. Shades of gray also exist between the two extremes: many statically typed languages defer certain checks to runtime, while dynamically typed languages often perform some checks statically to warn users. Many people familiar with statically typed languages such as Java or C wonder if those who use dynamically typed languages are too lazy to declare types. Furthermore, they assume that not declaring types will decrease the software's quality: " Imagine how many runtime errors will result ! " Not surprisingly, they view " prototyping " or " scripting " languages as suitable only for very small or toy programs. However, if these languages are so limited, why do leading companies such as Google publicly proclaim the benefits of large systems written in such languages? There are two answers to this question. First, current static type systems in mainstream object-oriented languages have little expressive power. For example, although they prevent users from adding a string to a bool, they don't prevent them from accessing the first element of an empty list, creating off-by-one errors , or using null pointers. In fact, static type systems can't detect most common programming errors. Yet for such systems to work, developers must spoon-feed (and sometimes strong-arm) the types at development time so that the type system—which is in essence a separate system from the main language—knows what the code is really doing. The waters are muddied further because even very simple approaches to testing capture focus 1 Dynamically Typed Languages T he languages discussed in this special issue have a long history, which is perhaps why some have had several different names over the years. One such language is Lisp, the second-oldest programming language. For years, many somewhat dismissively described languages such as Lisp as " scripting languages. " …