As a rule, avoid dynamically typed languages. The loss of compilation check time and the self-documenting nature of strong static typing are worth putting the type information in your source code. If the extra layout that you need to do when writing code is too large, then there may be interest in a language with an output type (Scala, Haskell).
Having information about the type makes the code more readable, and readability should be your number one criterion in coding. It is expensive for a person to read the code; anything that prevents the reader from understanding clearly and accurately is bad. In OO languages, this is even worse because you always make new types. A reader who is just familiar will become a flounder because they don’t know the types that are transmitted and modified. For example, the following is permissible in Groovy: def accountHistoryReport(in, out) Reading, I have no idea what in and out . When you look at 20 different reporting methods that look exactly like that, you can quickly jump over to completely killing.
If you really think you should have non-static typing, then a language like Clojure is a good compromise. Lisp-like languages are built on a small set of key abstractions and a huge number of features for each of the abstractions. So in Clojure I will create a map (hash) that has the attributes of my object. This is a little reductionist, but I won’t need to look at the entire code base to implement some unnamed class.
My rule is that I write scripts in dynamic languages and systems in compiled, statically typed languages.
source share