Halo_Four Halo_Four

Niner since 2011


  • Future directions for C# and Visual Basic


    .net has one fundamental problem: MSIL.
    I think that original design of .net was based on Java. JRE runs on multiple platforms so there is a need for some intermediate layer. However .net runs only on Windows (Mono is not a Microsoft product). I see absolutely no reason why .net has to have any intermediate languate or similar technology. Microsoft has no plans to move .net to other platform (OS X, Linux etc.) so what is MSIL for?
    I hope that WinRT become new native .net framework and everything should be great. Maybe in the future we will get native c# (without MSIL), that would be even better.

    The platform argument isn't as important as the hardware.  MSIL allows the same binary to execute as x86-32, x86-64, IA64, PowerPC (XBox360/XNA) and ARM (Windows Phone 7 and Windows 8) without recompilation.  A C++ application, even a WinRT Metro C++ application, will need to be recompiled to target each hardware platform*.

    * Yes, I know that an x86-32 application will run just fine under WOW64 on 64-bit Windows, but it can't take advantage of the 64-bit platform by doing so.

  • Future directions for C# and Visual Basic

    The async functionality in C# 5.0 and VB 11.0 look really nice.  The only thing that really disappoints me is that it completely ignores IObservable<T> which is a shame as it appears that it would work amazingly well when paired with the Reactive Framework extensions.  It is my opinion that if await were to be combined with foreach that a really simple and easy to follow syntax could be created to allow "enumeration" over IObservable<T> and IAsyncEnumerable<T>:

    foreach(var file in await Directory.EnumerateFilesAsync("*.mp3", SearchOptions.AllDirectories)) Console.WriteLine(file);

    Similarly, I think that combining async with yield could make for a really simple way to create new observables.