I tend to think that dynamically typed languages are on their way out. Here's my reasoning:
Dynamic languages were designed to have very expressive, succint syntax, in reaction to the 80-90s tendency towards verbose OOP languages (C++, Objective-C, Java). To this day the main argument people invoke to advocate Python, Ruby, etc., is their high signal-to-noise ratio.
Dynamic typing in itself has little or no demonstrable advantages versus static typing. Dynamically typed programs still have a type system, only type errors are caught are run-time rather than compile-time. This makes dynamically typed programs much more brittle, and much harder to provide good tooling for (i.e. static analysis is very limited).
However, the main argument in favor of dynamic languages, is itself largely made moot by the emergence of new, statically typed languages that are about as succint and expressive. In the Java and .NET world, Scala and F# are slowly rising, and they're every bit as succint and expressive as Ruby or Python.
def qsort(list):
if list == []:
return []
else:
pivot = list[0]
lesser = qsort([x for x in list[1:] if x < pivot])
greater = qsort([x for x in list[1:] if x >= pivot])
return lesser + [pivot] + greater
let rec quicksort = function
| [] -> []
| first::rest ->
let smaller,larger = List.partition ((>=) first) rest
List.concat [quicksort smaller; [first]; quicksort larger]
Even more concise, yet statically typed.
Some might point out the rise of Javascript as a counter-example. Yet TypeScript, a statically-typed superset of Javascript, is seeing rave adoption due to its ability to provide the same power, compatibility and expressiveness as Javascript yet make large-scale application development much more manageable.
Another argument for dynamic languages is their natural ability to interact with intrisically untyped APIs, like Web services. And yet, F# proves with Type Providers that a statically typed language can provide an even better experience there with full auto-completion.
Static typing has long been associated with high syntactic overhead and old-school OOP, yet this needs not be the case. New statically typed languages like Scala, F# and TypeScript demonstrate that succintness and expressivety need not to come at the expense of static typing, and its many advantages: performance, tooling, large-scale project management and robustness.
Question
Andre S. Veteran
I tend to think that dynamically typed languages are on their way out. Here's my reasoning:
Dynamic languages were designed to have very expressive, succint syntax, in reaction to the 80-90s tendency towards verbose OOP languages (C++, Objective-C, Java). To this day the main argument people invoke to advocate Python, Ruby, etc., is their high signal-to-noise ratio.
Dynamic typing in itself has little or no demonstrable advantages versus static typing. Dynamically typed programs still have a type system, only type errors are caught are run-time rather than compile-time. This makes dynamically typed programs much more brittle, and much harder to provide good tooling for (i.e. static analysis is very limited).
However, the main argument in favor of dynamic languages, is itself largely made moot by the emergence of new, statically typed languages that are about as succint and expressive. In the Java and .NET world, Scala and F# are slowly rising, and they're every bit as succint and expressive as Ruby or Python.
Here's for example a recursive implementation of QuickSort in Python (from http://en.literateprograms.org/Quicksort_(Python)#Using_list_comprehensions):
Here's an equivalent implementation in F# (from http://fsharpforfunandprofit.com/posts/fvsc-quicksort/):
Even more concise, yet statically typed.
Some might point out the rise of Javascript as a counter-example. Yet TypeScript, a statically-typed superset of Javascript, is seeing rave adoption due to its ability to provide the same power, compatibility and expressiveness as Javascript yet make large-scale application development much more manageable.
Another argument for dynamic languages is their natural ability to interact with intrisically untyped APIs, like Web services. And yet, F# proves with Type Providers that a statically typed language can provide an even better experience there with full auto-completion.
Static typing has long been associated with high syntactic overhead and old-school OOP, yet this needs not be the case. New statically typed languages like Scala, F# and TypeScript demonstrate that succintness and expressivety need not to come at the expense of static typing, and its many advantages: performance, tooling, large-scale project management and robustness.
What do you think?
Link to comment
Share on other sites
24 answers to this question
Recommended Posts