News for hackers. Stuff that matters.
Re:Ask HN: Why choose a dynamically typed language? by zwetan on Saturday August 07, 2010 @03:00PM (#1584070)
to sum it up very quickly

  statically typed: is-a, has-a
  dynamically typed: is-like-a, has-like-a
Read the introduction from Dynamic Typing in a Statically Typed Language http://lucacardelli.name/Papers/Dyn.ps "Even in a statically typed language there is often the need to deal with data whose type cannot be determined at compile time"

much more other interesting papers http://lucacardelli.name/indexPapers.html#Types and Semantics

If you find that today's C# can be more concise, it's simply because since C# 1.0 to C# 4.0 they added a lot of extensions that can make the language more dynamic (see http://en.wikipedia.org/wiki/C_Sharp_4.0 with the use of 'dynamic').

In comparaison, if you look at the ActionScript language which have its roots based on ECMA-262(ECMAScript), from AS 1.0 to AS 3.0 they evolved the language to make it statically typed, but you still keep dynamic functionalities like the * (any) type or the option to declare a class dynamic and add members to the prototype.

After it can be a long debate to try to prove which one is "better".

For example, combine unit tests and a dynamic language and you don;t really feel you're missing anything with type checking. Counter example, you can have a statically type checked language that compile and can still throw errors at runtime.

There are no comments on this comment yet.