Java Magazine, Jan/Feb 2018
The Decline of Dynamic Typing A feature once viewed as a convenience has become more troublesome than its worth If you follow the rise and fall of programming languages either from the comfort of an armchair ensconced with your preferred tools but interested in other peoples choices or from a keyboard happy to hyperkinetically try out all kinds of new idioms you will have noticed an unmistakable trend in modern language design a preference for static typing Look at the major languages that have emerged in the past decade Go Swift Kotlin and Rust theyre all statically typed Moreover languages that were once dynamic have added static typing The most conspicuous example is the recent set of updates to JavaScript or more accurately ECMAScript Apples choice to replace dynamically typed Objective C with Swift also follows this trend ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 05 from the editor PHOTOGRAPH BY BOB ADLER THE VERBATIM AGENCY As a quick refresher static typing refers to a type system that makes it possible to know the type of every data item and expression at compile time Specifically this means that the language does not allow the use of types that are resolved at runtime For example in JavaScript a dynamically typed language a variable is declared by using var rather than a specific type A variable can hold a string a number or a boolean at various times in the same program In contrast static types such as those found in Java force you to declare the type when you define the variable Static typing provides several important advantages The first advantage is that the compiler can perform significant program verification Because the compiler knows that i for example has been declared an integer it can Java in the Cloud Oracle Cloud delivers high performance and battle tested platform and infrastructure services for the most demanding Java apps Oracle Cloud Built for modern app dev Built for you Start here developer oracle com developersrule
You must have JavaScript enabled to view digital editions.