

CXXI: Bridging the C++ and C# worlds. - jstedfast
http://tirania.org/blog/archive/2011/Dec-19.html

======
xpaulbettsx
Being able to sanely bridge to C++ code from _any_ language is a huge deal,
Miguel and the rest of the folks at Xamarin are tackling some very difficult
problems and succeeding.

Especially for the games industry which Xamarin is really interested in
developing for (i.e. Mono as your game's scripting engine while the core
renderer is in C++), simple binding to C++ will be awesome.

------
keithwarren
I feel like the work Miguel De Icaza is and has been doing around C# platform
interop is some of the most challenging and beneficial work happening in the
FOSS. It is pretty startling what he and his team have accomplished in such a
short period of time, in some ways actually hearing where the C# language is
going from Microsoft and getting out ahead of the curve.

------
ComputerGuru
This is incredible work. Props to Miguel & co. for pulling this off; it's just
a damn shame that Microsoft just can't seem to decide where they want to go
with C#/.NET.

While the C# language has become one of the very best (as a _language_ not a
framework) with version 4, .NET seems to be tottering on the edge of oblivion.

~~~
omellet
While I think it's a shame that .NET is so Microsoft-centric, I see no
evidence for it "tottering on the edge of oblivion." Can you elaborate?

~~~
ComputerGuru
The only "safe" .NET framework to use for development is version 2.0.
Thankfully, with VS2010 you can compile C# 4.0 (the language version) against
the .NET 2.0 Framework.

Since 2.0, Microsoft has engaged in random "experiments" with the .NET
framework, taking it in random directions then killing those projects off and
starting again. XAML/WPF is the best example, where Microsoft begged the world
to stop using System.Windows.Forms (standard Windows widgets/controls) and to
switch over to vector-based XAML/WPF where each project needs a developer + a
completely separate designer to have any chance of making a half-decent
looking project.

Some developers (myself included) never made the switch - good call, because
today WPF is dead thanks to a) it was a stupid call in the first place and b)
it was very badly implemented, introducing incredible lag, requiring lots of
memory, and generally resulting in a bad user experience.

Their other problem is with distribution/versioning. New versions of .NET tend
to be released a month or so after new versions of Windows - meaning you'll
never get Windows shipping out of the box with the latest version of .NET.
While backwards compatibility is preserved (i.e. .NET 3.5 will run .NET 2.0
apps), it's very subtly broken as you'll find that a .NET 2.0 app compiled
with VS2010 will actually not run on an actual .NET 2.0 distribution because
no one bothered to check if the same method signatures existed for certain
functions and whatnot.

Now the new challenge is Windows 8: first, Microsoft seems to be leaving .NET
entirely pushing their new Metro toolkit and WinRT as the preferred routes of
development. IMHO this will be a complete failure as it leaves behind both the
.NET developers AND the traditional, hard-core WIN32 developers in an attempt
at a "clean slate" that no one actually wants.

Even worse, .NET 4.0 in Windows 8 breaks all that backwards compatibility. Out
of the box, it will not run apps compiled for .NET 3.5 and below - all .NET
apps need to be recompiled to run on .NET 4, or the user will need to install
.NET 3.5.

Footnote: Unfortunately, Microsoft's other good feature for .NET, Linq, was
introduced in v3.5 of the .NET Framework. If you're targeting Framework 2.0,
this is the one good feature you'll miss out on.

~~~
xpaulbettsx
There's a lot of things in here that are either vast exaggerations ("need a
designer") or simply factually untrue (WinRT = goodbye .NET).

By the time that Win8 ships, .NET 2.0 will be six years old - do you really
expect them to support it in the latest OS forever?

~~~
ComputerGuru
It won't ship with (out of the box) support for .NET 3.5 apps either - and
that shipped for the first time with Windows 7.

As far as needing a designer goes - perhaps not, but in comparison to SWF,
certainly. With SWF, you dragged-and-dropped standard Windows controls we all
know and love to a form, did the bindings to event handlers, and that was the
end of it.

XAML places a much larger burden on the developer. Sure, it gives you the
ability to create more flexible layouts, but at a tremendous cost. You have to
actively design your application's user interface from a much, much lower
level up. .NET's biggest draw was the RAD factor, but with XAML/WPF, a lot of
that for utilites and other smaller applications with GUIs was left behind.
There's certainly nothing RAD-esque about WPF.

~~~
wluu
A recent post on Win Rumors mentions that a future beta release of Windows 8
will include .NET 3.5 - [http://www.winrumors.com/leaked-windows-8-pre-beta-
install-s...](http://www.winrumors.com/leaked-windows-8-pre-beta-install-
screenshots-demonstrate-theme-color-picker/)

"Windows Media Center will also return to Windows 8 beta alongside the typical
Windows games, DVD creator and .NET 3.5. All were missing from the developer
preview, made available in September."

~~~
ComputerGuru
Thank you. They say not to shoot the messenger of bad news, but I think it's
more than fair to upvote the bearer of good tidings. You've made my day.

