Raja Krishnaswamy and Jesse Kaplan: CLR 4 - Inside No-PIA
- Posted: May 27, 2009 at 8:43 AM
- 43,434 Views
- 7 Comments
Download
How do I download the videos?
- To download, right click the file type you would like and pick “Save target as…” or “Save link as…”
Why should I download videos from Channel9?
- It's an easy way to save the videos you like locally.
- You can save the videos in order to watch them offline.
- If all you want is to hear the audio, you can download the MP3!
Which version should I choose?
- If you want to view the video on your PC, Xbox or Media Center, download the High Quality WMV file (this is the highest quality version we have available).
- If you'd like a lower bitrate version, to reduce the download time or cost, then choose the Medium Quality WMV file.
- If you have a Zune, WP7, iPhone, iPad, or iPod device, choose the low or medium MP4 file.
- If you just want to hear the audio of the video, choose the MP3 file.
Right click “Save as…”
- High Quality WMV (PC, Xbox, MCE)
- MP3 (Audio only)
- MP4 (iPod, Zune HD)
- Mid Quality WMV (Lo-band, Mobile)
- WMV (WMV Video)
You will learn, in great detail, about Type Equivalence in a soon to be released conversation with Raja and Vance Morrison. For now, wrap your head around No-PIA. Raja and Jesse are great at explaining complexity in simple to understand ways.
No-PIA in CLR 4 is the beginning of something very, very useful (consider the non-interop scenario (managed to managed) for a moment. Fascinating, Captain.)
Enjoy!
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.
Follow the Discussion
So this Type Equivalence... are we talking about something that might be the basis of "static duck typing" as in C++ templates?
e.g. public static void Foo<T>(T arg) where T : IBar
Currently this means T must implement IBar... will type equivalence open up the possibility that T could be something that satisfies the method signatures of IBar, but doesn't necessarily have to implement it?
That would be great. Suppose I have to work with several third party classes, they all have a method:
void Log(string str)
but they don't implement any common interface. I might write:
interface ICanLog { void Log(string str); }
Would I then (with some attribute magic?) be able to assign instances of those third party classes to variables/parameters of that interface type?
ICanLog canLog = new ThirdPartyThing();
Bah... based on this, I'm guess the answer is no.
If you think about it, type equivalence is about matching two essentially 'identical' types that are not actually the same clr type.. which is different to duck typing which is more of a.. these types are different (even outside of the clr type), but they look similar.
The key difference tending to be that type equivalence is about allowing a boundary to be broken where two types are intending to be the same thing, but duck typing is less about the types intending to be the same, but just looking the same.
Personally I don't see a lot of places where duck typing would be useful.. tends to be a simple proxy class fits most scenarios.
It becomes more of a problem as a project evolves over several years, especially with independently developed components going into it.
Over time, the number of cases where proxy classes are needed grows until they blot out the intention of the "actual" code, which is when a language feature becomes valuable.
Does this embedding only work if you use a VSTO template in Visual Studio?
For example, I'm working on project right now that's a WPF application which uses the PIAs to extract data from Excel for use by another application, and my app is basically a bridge for these programs, is this scenario supported?
Don't we have type embedding already, of sorts. Open up Reflector load say, the Word PIA and cut and paste the class interfaces you need into your project. This then gives you masive flexibility to modify the interfaces, leave member out and/or redefine members so they do not throw exceptions, but return hResults. Then you can use Compiler extensions to bolt on Word 12 interfaces and methods onto the Word 10/11 Object model. This is a very usefull trick
Helpful
Remove this comment
Remove this thread
close