I am looking for example where things in python would be easier to program just because it is dynamically typed?
I want to compare it with Haskell type system because its static typing doesn’t get in the way like c# or java. Can I program in Haskell as I can in python without static typing being a hindrance?
PS: I am a python user and have played around little bit with ML and Haskell.. … I hope it is clear now..
Well for one you can’t create a list containing multiple types of values without wrappers (like to get a list that may contain a string or an int, you’d have to create a list of
Either Int Stringand wrap each item in aLeftor aRight).You also can’t define a function that may return multiple types of values (like
if someCondition then 1 else "this won't compile"), again, without using wrappers.