Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Keynote - Martin Odersky: Reflection and Compilers

1 hour, 9 minutes, 26 seconds


Right click “Save as…”

Reflection and compilers do tantalizing similar things. Yet, in mainstream, statically typed languages the two have been only loosely coupled, and generally share very little code. In this talk I explore what happens if one sets out to overcome their separation.

 The first half of the talk addresses the challenge how reflection libraries can share core data structures and algorithms with the language's compiler without having compiler internals leaking into the standard library API. It turns out that a component system based on abstract types and path-dependent types is a good tool to solve this challenge. I'll explain how the "multiple cake pattern" can be fruitfully applied to expose the right kind of information.

The second half of the talk explores what one can do when strong, mirror-based reflection is a standard tool. In particular, the compiler itself can use reflection, leading to a particular system of low-level macros that rewrite syntax trees. One core property of these macros is that they can express staging, by rewriting a tree at one stage to code that produces the same tree at the next stage. Staging lets us implement type reification and general LINQ-like functionality. What's more, staging can also be applied to the macro system itself, with the consequence that a simple low-level macro system can produce a high-level hygienic one, without any extra effort from the language or compiler.

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • borkdorkorkborkdorkork

    I don't see slides and camera doesn't zoom on screen :-\

  • CharlesCharles Welcome Change

    @borkdorkork: Hi. We don't have the slides available yet. We hope to, though!


  • Andre van DelftAndre van Delft

    The sound is terrible. Big pity.

  • CharlesCharles Welcome Change

    @Andre van Delft:

    We are looking into what we can do (the signal we received at the venue was just too maxed out and there is no pro audio equipment serving that room). We have a skilled editor looking into these audio "issues". Stay tuned.


  • Bent Rasmussenexoteric stuck in a loop, for a while

    Oh, Lang.net already in progress! 

    Great talk here.  Smiley

    (I agree on the audio being sub-par. Compare the audio to e.g. the latest episode of cloud cover and you'll have much more pleasant voice recordings. The content rocks though.)

  • CharlesCharles Welcome Change

    @exoteric: Yeah. The audio system at the venue was less than stellar. We did what we could do. Now, as I mentioned above, we are working on it in post-production. (well, post post-production at this point). No guarantee we can magically make it better, but we're trying. No need to discuss this more on this post. Keep on topic!



  • Scala may be the best choice for JVM environment. It gives developers some functional concepts but is quite simple language still (for a Java developer). This was a great presentation. Also challenging audience.

    However, I didn't like the "Cake pattern". It reminds me of the C# partial classes: Try to be object-oriented (classes) but still break two basic design principles of OO:

    1. Single responsibility principle: Composition classes often have many responsibilities.

    2. Open Close Principle: Software entities like classes, modules and functions should be open for extension but closed for modifications. This means that the internal state and design of the entity should not be visible to outside.

  • bhupendrabhupendra

    guys..see the date(2nd April 2101)

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.