Jomo Fisher—I posted yesterday about using MEF in F# programs. In the comments Oldrich asked if it was possible to do the same thing in F# scripts. It is indeed possible. It actually looks like a really powerful combination because you can naturally extend your scripts just by adding new #load directives at the top. There are three pieces to this sample. You have to break your interfaces out into a separate .fsx. Realistically, you’d probably do this in a real compiled F# program too so this isn’t a huge burden on simplicity.
Thanks Oldrich, for giving me an excuse to try this out. This posting is provided "AS IS" with no warranties, and confers no rights.
Very interesting post! I wasn't that interested in MEF (except for extending Visual Studio) but that is a thought-provoking sample.