CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    C++/CLR - what do you think ?

    Hi all again.

    This I hope will turn into a good discussion.

    I think the changes to the syntax are a good idea : at least it makes it obvious when your using managed code rather than using native.

    However, the port of STL to managed STL I can't see much point to.

    After all, if you're going to write managed code why not write it in C# which is designed for it.

    For instance :

    Code:
    array<string ^> ^myArray;
    becomes

    Code:
    array<string> myArray;
    in C#.

    I have to admit that the more code written using generics I read in C++/CLR the less readable I think the new syntax is.

    I'm beginning to wonder whether the point to writing C++/CLR and more specifically Microsoft's decision to port STL to the new managed syntax isn't just a step by them designed to get the stick-in-the-muds of STL to accept managed code.

    What do you think ?

    Would you ever use managed C++ (personally I use C# for managed, C++ for native and use P/Invoke via COM) in preference to C# ?

    Are there any reasons for using managed C++ in favour of using C# other than being able to interface seamlessly with existing native code ?

    Darwen.
    Last edited by darwen; December 9th, 2005 at 06:11 PM.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  2. #2
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Thumbs down Re: C++/CLR - what do you think ?

    Personally, I always find C++ to be complicated and confusing language. It is good and powerful language, but it works on lower level of abstraction than languages like C#, Java, Smalltalk etc... For application programming, I have never needed the power of C++. In other words, I think that C++/CLR is redundand in context of managed code.

    I agree with Darwen in:
    Quote Originally Posted by darwen
    I'm beginning to wonder whether the point to writing C++/CLR and more specifically Microsoft's decision to port STL to the new managed syntax isn't just a step by them designed to get the stick-in-the-muds of STL to accept managed code.
    Althought C++/CLR is legitime language, I am affraid that it could became dangerous, because it allows developers to focus more on performance plays than on good object design.
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

  3. #3
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: C++/CLR - what do you think ?

    I think the changes in the syntax were really needed. MC++ is so tiresome. C++/CLI feels much more natural.

    I think a probable answer to your question is the same as for "why did MS create VB.NET?" Without being a VB.NET expert, I can say that VB.NET is just a different flavour of C#. So, why did Microsoft create two similar languages? The answer is simple: there were many VB programmer, and MS could not loose them. So they created VB.NET.

    Why do we have STL.NET? Because there are many STL fans (or fanatics) and MS tries to determine these people to write with managed C++. They may not easily turn to C#, but they could rather be converted to C++/CLI.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  4. #4
    Join Date
    Jan 2002
    Location
    Scaro, UK
    Posts
    5,940

    Re: C++/CLR - what do you think ?

    They may not easily turn to C#, but they could rather be converted to C++/CLI.
    You make it sound like their being turned to the "Dark Side".

    I do agree with you Cilu with VB.NET - I don't see a great deal of point to that either, except that it demonstrates you can have a variety of different languages all using the .NET framework.

    Is anyone actually using VB.NET in a commercial environment ? How does everyone find it compared to C# ?

    Darwen.
    www.pinvoker.com - PInvoker - the .NET PInvoke Interface Exporter for C++ Dlls.

  5. #5
    Join Date
    Dec 2002
    Location
    London, UK
    Posts
    1,569

    Re: C++/CLR - what do you think ?

    I love C++. Think that kind of power is just great. But that said, I am loving C# too. The time to market is just awesome.

    There are people writing VB.NET in commercial environment. But they are few and far between. Generally it is C#. In commercial (or industrial) environment VB is sort of frowned upon... it really doesn't lend itself to GOOD oo-design and coding. VB programmers do have a bit of a rep for being "hackers". Plus it takes significantly longer to code the same thing in VB as opposed to C#, simply because of the verbose syntax.

    VB .NET is pretty much a marketting ploy by M$... but don't mock them, cos it is working (J# however is a bit of a lost cause)!!

    With everything going ".NET" why not STL?? It sort of makes not sense... but what is the number one reason for NOT moving over to the new .NET languages?? People are happy with what they are used to, so I think it is very clever of M$ to say
    "This is a complete waste of time, but it will give us another foot in the door."
    Good marketting, if you think about it. But practically it is a complete waste of time :-).
    Mike

  6. #6
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: C++/CLR - what do you think ?

    Quote Originally Posted by Darwen
    You make it sound like their being turned to the "Dark Side".
    No intention on my side to bring "ocult" forces into the discussion.

    As for VB.NET being used in commercial environments, I'm not very sure. I know about few big companies here that work to some extent with VB, but haven't heard anything avout VB.NET.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  7. #7
    Join Date
    Aug 2005
    Posts
    132

    Re: C++/CLR - what do you think ?

    Quote Originally Posted by Pinky98
    With everything going ".NET" why not STL?? It sort of makes not sense... but what is the number one reason for NOT moving over to the new .NET languages?? People are happy with what they are used to, so I think it is very clever of M$ to say
    "This is a complete waste of time, but it will give us another foot in the door."
    Good marketting, if you think about it. But practically it is a complete waste of time :-).
    I don't think that the #1 reason for people not going with .NET is a resistance to change. I think it's a resistance to Microsoft more than anything.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured