Mar 062009
 

I know that .Net 4 is going to have some pretty cool features around dynamic typing and C++0x is also adding some auto typing features. I was thinking about all of this today and realized that what I really use most of the time is an inferred type. Essentially it would infer a new type based on the method’s contents.

Let’s say we have this:

In static languages this fails because Object doesn’t contain the method methodCall. However, what if we told the compiler to create a new interface based on the content of the method? This code would then look like this:

The autotype keyword would cause the compiler to actually create this code:

This would now compile. Next, a caller to this method could pass in any object whose type the compiler could add this interface to. If you called it like this:

The compiler could take the interface it created for this method call and then see if the type passed in could implement that interface. If MyClass has already been compiled, it could do one of two things:

  • If MyClass is accesible as part of the current compilation unit, it could update the compiled Class to implement the interface
  • If it isn’t part of the current compilation unit and isn’t final, it could create a proxy for the call that implements the interface and delegates the call

Not sure yet how #2 really works or if it even makes sense to do it that way, but it seems to be the only way to make it work if the Class is in a JAR or DLL or something like that.

The only issue would be reflection. How could you reflection on the method and then pass an Object to it so that it would not completely blow chunks at runtime? Perhaps the reflective method invocation could determine if the object being passed could be proxied to the dynamic interface and then create a proxy on the fly.

Anyways, just pondering type systems in general today….

Feb 182007
 

I just went over to MSDN to look for my product keys from my subscription which I received at last years Microsoft Technology Summit. However, looks like someone really messed up a deployment of that application and I got one of those nasty ASP.Net errors, which anyone who has ever developed in .Net knows very well.

So, I figured I’d call MSDN and let them know. Well, the MSDN office is closed on the weekends and I tried calling Microsoft support direct to let them know. However, the call center employee I talked to had no clue how to let the folks who manage the website know. When I heard that I was floored. A company as large as Microsoft should at least have so kinda of system that employees can use to raise alarms about website failures so that they get handled. Hell, Orbitz call centers could always contact Orbitz headquarters to let them know the site was down. But most of the time we already knew that since the website is monitored 24/7. Well, guess I just have to wait for them to restore the website but here’s the screen shot I grabbed just for fun.

Enjoy!

Screenshot-Runtime Error - Firefox.png

Feb 162007
 

I’m convinced that Microsoft hates developers and leaves them as the last group of individuals it is concerned about when developing software. I’ll write about all sucking from Microsoft later, but for now, just enjoy these images of how Microsoft supports their developers.

Visual Studio 2005 Professional from Microsoft

visual-studio-image.jpg

Of course, JetBrains to the rescue!!!! Visual Studio 2005 Professional from JetBrains (ReSharper installed):

resharper

[tags]visual studio, .net, resharper[/tags]