Dynamically typed languages help: Use this for help: http://tratt.net/laurie/res
ID: 672819 • Letter: D
Question
Dynamically typed languages help:
Use this for help:
http://tratt.net/laurie/research/pubs/html/tratt__dynamically_typed_languages/
Provide citations from where you got information
Topic: Advantages and Disadvantages of Dynamically Typed Languages. Instructions: In your own words: Type a 2 page essay- 1 page advantages and 2^nd page disadvantages Put pictures or illustrations, put programming codes, etc. If there are any terms, then describe about that term. But make sure it is in own words and not copied.Explanation / Answer
Advantages of Dynamically Typed Languages:
Disdvantages of Dynamically Typed Languages:
1. Dynamic languages are theoretically at a disadvantage, all else being equal, because they specify less about how the code works (what the constraints are), and therefore less of the refactoring can be done automatically, and problems that arise cannot be detected automatically as well.
2. But all else is not equal. The most popular dynamic languages allow for highly compact yet comprehensible code, which generally makes development in them faster, and makes the logic easier to spot visually. So you might lose some of the relative advantage of working in a dynamic language and still come out ahead, especially if you were planning on doing it by hand anyway.
3. On the other hand, there exist statically typed languages with essentially the same advantages as dynamic languages Haskell is perhaps the leading example, but OCaML/F#, Scala, and others are in this category also. Unfortunately, since they are less heavily used than the most popular statically typed languages, they don't have as extensive of toolsets for them (e.g. for refactoring).
4. Automated refactoring was invented in Smalltalk, a dynamically typed language. So no, its not impossible to have automated refactoring in a dynamically typed language. How hard it is depends far more on other factors besides the typing discipline. C++ and Java are both statically typed, but refactoring tools only really exist for Java. Smalltalk with its introspection and simple syntax was a really good candidate for refactoring tools.
5. In some ways, dynamic typing actually makes refactoring easier. If you have a good testing suite, you can be sure your refactorings haven't broken anythings. A dynamically typed code base is typically smaller. Additionally, refactorings tend to affect less code. Altogether the effort involved in manually refactoring a dynamic code base is less then that of a static code base.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.