Skip to main content

Dynamic/static language

Posted by staufferjames on August 27, 2007 at 11:41 AM PDT

What if a Java allowed both static and dynamic types? That might allow the best of both worlds. i.e.:

String str = "Hello";
var temp = str;
temp = new Integer(10);
System.out.println(temp.intValue());
  1. Would that be possible?
  2. Would that be beneficial?
  3. For languages that support it, how is it used? When are static types used and when are dynamic types used? Are there patterns?
  4. Is this a similar proposal to
    automatic casting
    ?
Related Topics >>