Exploring Dynamism - Randal

From JVMLangSummit
Revision as of 11:41, 16 September 2009 by Al3x (talk | contribs)
Jump to navigationJump to search

Slides: File:Exploring dynamism.pdf


  • "a mental exploration of dynamic language features"
  • "crystalize what dynamism is"
  • static vs dynamic as particle vs wave
  • sometimes a binary distinction, sometimes not
  • "no language is entirely static or dynamic"

Dynamic Typing

  • you can do more stuff with a dynamic type system
  • think of it as a way to extend the type system by having types inspect run-time state

Dynamic Dispatch

  • "stages of dynamism"
  • multiple dispatch can be done either statically or dynamically
  • many forms of caching (polymorphic inline caching, et. al.) are forms of dynamic dispatch


  • not strictly a dynamic language feature, but more common in dynamic langs than in static ones
  • annotations (ex: research at IBM on using annotations to enforce web application security constraints)

Dynamic Compilation

  • compiling blocks of code, capturing the environment around that code (closures, runtime environment, etc.)
  • higher-order functions: methods generating other methods at runtime
  • interaction (REPL), as with the Python command line
  • sci-fi future: self-modifying code

Dynamic Loading

  • another strategy for adding new code at runtime
  • including new libraries
  • binding routines to objects
  • mixins/traits/roles and other cross-cutting inheritance/extension models
  • dynamic unloading: not often seen because dynamic languages traditionally power applications that run for short periods and wouldn't see gains from unloading to free up memory


  • "static systems and dynamic systems are both critical"
  • tradeoffs of tighter control vs greater abstraction, productivity vs performance
  • hybrid systems may be the most effective