Reputation
Next privilege 125 Rep.
Vote down
Badges
2
Newest
 Supporter
Impact
0 people reached

  • 0 posts edited
  • 0 helpful flags
  • 3 votes cast
Oct
19
awarded  Supporter
Oct
9
comment What functionality does dynamic typing allow?
@spirc you can emulate ADTs in a classical OO language using multiple classes that all derive from a common interface, run-time calls to getClass() or GetType(), and equality checks. Or you can use double dispatch, but I think that pays off more in C++. So you might have a JSObject interface, and JSString, JSNumber, JSHash, and JSArray classes. You would then need some code to turn this "untyped" data structure into an "application typed" data structure. But you would probably want to do this in a dynamically-typed language, too.
Oct
5
comment What functionality does dynamic typing allow?
I don't understand your example. If you are talking about code which accepts unstructured input (i.e. a YAML string), it's true that the unstructured input has no statically-known structure, other than it is a string. However, part of the code in such a system would be to map the unstructured (string) data into a structured (object-based, perhaps) representation. And a useful language would have enough compile-time or run-time support to generate the code that does that conversion.
May
22
awarded  Autobiographer