Three Languages

topic posted Wed, January 21, 2004 - 2:27 PM by  Bartosz
Share/Save/Bookmark
Advertisement
Surprisingly, I like the new programming model proposed by Microsoft for Longhorn.

The way I normally program interactive applications is by dividing my code into the trio: model, view, and controller. The view is responsible for displaying stuff; the controller, for processing user input; and the model, for the hard work.

In Longhorn (codename for next version of Windows), you'll be able to use three different languages for the three components.

The view in Longhorn is programmed a lot like a web page, using XAML (Extensible Application Markup Language) which is a lot like HTML. The simplest applications could be written entirely in XAML, just like most web pages are written in HTML. That's the view part.

If you want to add more interaction with the user, you have to add a controller. You do it, for instance, in C#. The interactive elements in your view will have C# handlers. This is again very similar to how interactive web pages are made--using some kind of scripting language, like JavaScript or VB.

Finally, if you want your application to do some heavy work, you'd write the model--and here you may choose yet another language, for instance C++ -- for robustness and performance.

I think it's a cool idea.
posted by:
Bartosz
Seattle
Advertisement
Advertisement
  • Re: Three Languages

    Thu, January 22, 2004 - 7:15 AM
    So do I. I hate Microsoft is doing it. Why? Because I don't want to be pulled into their universe. They are like the Borg and I fear assimilation. I favor the rebellion against the empire. It is healthier that way. Move over Bill Gates?!

    Can't another "brother" make a billion?
    • Re: Three Languages

      Fri, January 23, 2004 - 4:37 PM
      But you do like Java, don't you? Well, the difference between Java and C# is that Java is Sun's proprietary language and they don't want to relinquish their control over it, whereas C#, although invented at Microsoft, is undergoing public standarization, just like C++ did. What's more, the .NET runtime is also undergoing standarization, so if anybody wants to port it to Linux, they are free to do so. All Bill Gates is saying is that Microsoft believes that the .NET implementation on top of Windows is better than the competition. (I understand your sentiments, but what can you do? Microsoft is there to stay. And you can always turn to Linux.)
      • Re: Three Languages

        Fri, January 23, 2004 - 8:23 PM
        MS itself released the "Rotor" CLR implementation for FreeBSD, but I haven't heard anything more of it. Unless the situation changes it sounds unlikely .NET will get a toehold on the Unix platforms, and therefore likely it will continue to be excluded from multiplatform applications.
        • Re: Three Languages

          Sat, January 24, 2004 - 12:40 PM
          It might also be the other way around: Linux will exclude itself from the consumer side of the Internet, which is what Microsoft is attacking using .NET.
          • Re: Three Languages

            Sat, January 24, 2004 - 3:05 PM
            I was assuming server applications, of course Unix (especially commercial Unix) has no presence on the desktop.

            But discussing the desktop, I don't see the consumer market generating any strong reasons to use .NET.
  • Re: Three Languages

    Thu, January 22, 2004 - 2:06 PM
    Would that mean you can use C++ as long as it compiles to CLR, managed code? If so, are you getting any performance gain?
    • Re: Three Languages

      Fri, January 23, 2004 - 4:49 PM
      I'm not 100% sure, but I believe you can combine compiled C++ with managed (C# or C++) code. .NET has this built-in multilingualism.
      By the way, managed C++ is supposed to be a reasonably good language--a fair competition to C#. Microsoft hired Herb Sutter (author of Exceptional C++, CUJ editor, C++ Standards Committee member) and gave him free hand with it.
      • Re: The hidden C++ (managed)

        Sun, February 8, 2004 - 1:45 PM
        So is managed C++ just as good as C#, or is it only about half way between raw C++ and C#.NET? Would C# die on the vine if everyone realized they could just do MC++ ? What's the dividing line?
        • Re: The hidden C++ (managed)

          Mon, February 9, 2004 - 11:09 AM
          If you are a diehard C++ programmer, you'd probably stick to managed C++. I believe that anything you can do in C#.NET you can do in managed C++. On the other hand, C# might be simpler to learn, expecially for people who like garbage collection.

          The biggest problem right now with .NET is that virtually nobody has the runtime installed on their machine. So you'd have to distribute your .NET product with the huge runtime. That pretty much eliminates internet downloads, except for the most dedicated clients.
        • Plauger on managed C++

          Thu, February 12, 2004 - 2:29 PM
          I just read an editorial in February issue of C/C++ Journal by P.J.Plauger, in which he essentially confirms what I posted here about managed C++. In particular he says: "Now the C++ folks are getting more ambitious. They don't want to just stay in the game; they want C++ to be the language of choice for writing all sorts of code, managed and otherwise." He thinks Herb Sutter does a very good job at that.