How often do you take advantage of dynamic typing, in fact, probably not possible in a statically typed language?
What am I interested in, how often is it used in the real world (rather than displaying)?
Honestly: Most of the benefits are dynamic languages (note that I "dynamic language", "dynamically Typed language "is not needed) Do not do anything with dynamic typing (and Python is my favorite language!). They only take care of it because it comes to flexibility, because most statically-typed languages are difficult. Haskell is often told for a reason - while talking about this topic. In practice, I see a slight difference between a steady but expressive (for example, naturally normal) and a dynamic type of system.
The main advantage associated with dynamic typing is usually multivarious / duck typing / generic programming. Like most of my Python code works, exactly when a person comes with different types and passes it, unless the fields / methods in it use my code (provided they are roughly equal Are). Actually, it saves us the hassle of creating an interface that is possible in every class, and as much as possible, we want to pass that special function. The profit should be self-evident.
As mentioned above, it is unrelated for stable / dynamic typing (this is the thing that imbu ducks typing more comprehensive combination check at compiled time) However, behavior These two hands come in handy, because structural typing (ML / Okkell / Haskel / ... with no static-type is mainstream language, but there is nothing in the mainstream, and still a long way to go The way is fixed) C ++ T Plates the possible exception (which compared to Haskell as extraordinary pain).
Comments
Post a Comment