Coffeehouse Post

Single Post Permalink

View Thread: Code Name Roslyn
  • User profile image

    , Adam​Speight2008 wrote

    I didn't get why having the Compiler-as-a-Service is a good thing?

    The only things I've seen are a REPL (Anders's PDC demo) and tools for the IDE.

    What use will it serve in "normal" applications?

    I define normal as standard business applications.

    "Will it make Office run any faster?" 


    Uh I can see a *LOT* of use for this kind to stuff.....

    for example if i want to create a tool that allows the user to define some rules for an application.

    i can possibly create a visual editor and use the compiler services to generate the assembly and then i can serialize it and run it ....

    large business systems often need some kind of "rules engine" to allow some customized logic.

    thats one area for a start.

    yes a lot of the uses will be in building tools.....

    but that can lead to "Making office run faster" (or whatever app you are making)


    well in stead of just generating C# code and compiling it you might have a tool that generates code and then ask the compiler to return a graph and then you may be able to examine the graph and modify it to optimize it and then feed that back to the compiler and generate a better assembly in the end.  in most cases the compiler will do a good job but in others you may have insight into the problems the application will have at runtime that the compiler can not today ever know about.

    and last is what if the app can re-build it's own code at runtime ?  re-compile parts of it's own IL to make it run faster on a given pc ?  collect performance data while it runs and decide that it can get beter perf if it re-generates part of it's code.