Difference between revisions of "Exploring Dynamism - Randal"

From JVMLangSummit
Jump to navigationJump to search
 
Line 2: Line 2:
  
 
----
 
----
 +
 +
= Abstract =
 +
An open discussion on the fundamental concepts of dynamic languages, and the implementations that support them. What is a dynamic language? With more and more dynamic features used in static languages (JIT, PIC, etc) does the distinction even matter? What challenges do researchers and developers face as they move from static concepts to dynamic concepts? Are there aspects of "established wisdom" in computer science that don't apply well to dynamic languages?
  
 
= Introduction =
 
= Introduction =

Latest revision as of 15:33, 18 September 2009

Slides: File:Exploring dynamism.pdf


Abstract

An open discussion on the fundamental concepts of dynamic languages, and the implementations that support them. What is a dynamic language? With more and more dynamic features used in static languages (JIT, PIC, etc) does the distinction even matter? What challenges do researchers and developers face as they move from static concepts to dynamic concepts? Are there aspects of "established wisdom" in computer science that don't apply well to dynamic languages?

Introduction

  • "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

Introspection

  • 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

Conclusions

  • "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