Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Managed C++ - worth the effort?

Managed C++ - worth the effort?

Scheduled Pinned Locked Moved The Lounge
csharpc++comtoolsquestion
47 Posts 33 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D DaveyM69

    I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

    Dave
    BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
    Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

    D Offline
    D Offline
    Danillo
    wrote on last edited by
    #23

    I agree with most of the previous writers. If you tend do go into embedded programming where you have restrictions on memory/performance it might be a good idea to jump on the C++ train. On the other side, from my experience, I would rather invest in learning more on C# and software design issues. For client applications the suggestion for WPF/XAML is a good idea too. I think these two technologies definitely have a future. Hope I helped a little bit and good luck at your new job from switzerland Dani

    D 1 Reply Last reply
    0
    • D DaveyM69

      I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

      Dave
      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

      D Offline
      D Offline
      dmitri_sps
      wrote on last edited by
      #24

      I'd agree with others that you'd better not try a new language on entire project, but hey, you can write some components in managed C++, just for the fun of it. Then you can write some in un-managed C++, to feel the difference. With C++ you will get - different kind of templates (sorely missed by me in C# and Java): templates that allow to apply patterns to un-related classes - destructors to manage external resources (instead of using the "using" construct) And with unmanaged C++ you will also get multiple inheritance. Just do not use pointers - use smart pointers or shared pointers (download "boost" library for example) or write your own smart-pointer template ;P

      M 1 Reply Last reply
      0
      • T ToddHileHoffer

        What is a bespoke?

        I didn't get any requirements for the signature

        H Offline
        H Offline
        hairy_hats
        wrote on last edited by
        #25

        ToddHileHoffer wrote:

        What is a bespoke?

        They hold a bewheel together.

        1 Reply Last reply
        0
        • P PIEBALDconsult

          Do one thing and do it well. Well, OK, I'll get flamed for that, but I certainly wouldn't try to produce a commercial app while trying to learn the language. There are already too many people on here doing that anyway. Write the app in C# and learn something else on the side if you like.

          D Offline
          D Offline
          DaveyM69
          wrote on last edited by
          #26

          PIEBALDconsult wrote:

          too many people on here doing that

          Good point!

          PIEBALDconsult wrote:

          learn something else on the side

          This particular application is sort of an 'on the side' thing. Part of my job, but not the main focus and I can take as long as I like. Seems like the perfect opportunity to stimulate the old grey matter with something new, but still get paid for it!

          Dave
          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
          Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

          1 Reply Last reply
          0
          • D Danillo

            I agree with most of the previous writers. If you tend do go into embedded programming where you have restrictions on memory/performance it might be a good idea to jump on the C++ train. On the other side, from my experience, I would rather invest in learning more on C# and software design issues. For client applications the suggestion for WPF/XAML is a good idea too. I think these two technologies definitely have a future. Hope I helped a little bit and good luck at your new job from switzerland Dani

            D Offline
            D Offline
            DaveyM69
            wrote on last edited by
            #27

            Danillo wrote:

            good luck at your new j

            Thanks! I've played around with WPF and found it to be a PITA. Very pretty and flexible on the UI side though, and still the same basic coding behind the scenes. I just found it took ages to make some stuff work as expected when in WinForms it just works. I may just have been playing around too much in the XAML instead of doing stuff in the 'real' code... maybe I'll have another look, especially now we have a few WPF experts at CP.

            Dave
            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
            Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

            1 Reply Last reply
            0
            • S Stuart Dootson

              How about F#[^] - learn a new paradigm (functional programming) along with the first language to be added to the release version of Visual Studio (when VS2010 is released) since C#...

              D Offline
              D Offline
              DaveyM69
              wrote on last edited by
              #28

              Thanks for the suggestion - I'll have a good look at this.

              Dave
              BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
              Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

              K 1 Reply Last reply
              0
              • T Todd Smith

                The poor guy wants to learn something new! Don't discourage him. Just lead him in a useful direction which Managed-C++ is not. I would suggest :thumbsup: VB6 :thumbsup:

                Todd Smith

                D Offline
                D Offline
                DaveyM69
                wrote on last edited by
                #29

                Todd Smith wrote:

                VB6

                Been there - and tried to forget it! I actually wrote some pretty decent stuff that's still in use today. I'm just glad I don't have to support it ;) It seems the general consensus is to forget about C++. I'll take the advice :-D

                Dave
                BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                1 Reply Last reply
                0
                • L leckey 0

                  Congrats on the job! In college we were taught C++ which made C# very easy to learn. I think it might be more complicated the other direction. C# can do basically the same stuff as C++ (there might be those more knowledgeable than me who might say otherwise) but I like the complexity like dealing with pointers and such. I believe if you can "program" it doesn't matter what language it is in. I took a course where we had to do the same project in 4 languages including OOP languages and non-OOP languages. It really taught me how to sit down, figure out the logic, and then worry about the semantics. It's almost like talking; if you understand noun, verb, adjective...you can learn a new language. You learn that in Spanish the adjective comes after the noun where in English is usually comes before. If you understand the basics, it's just the willingness to learn the specifics. Best of luck on the new job!

                  Back in the blog beatch! http://CraptasticNation.blogspot.com/[^]

                  D Offline
                  D Offline
                  DaveyM69
                  wrote on last edited by
                  #30

                  leckey wrote:

                  Congrats on the job! Best of luck

                  Thanks! I've recently reread an old C++ book which is what prompted me to think about this. I didn't realise just how similar C# was. Obviously there are some significant differences but I think (I haven't applied it so can't be sure) I understood all of it. Even though we don't get to play with pointers in C#, I think it's almost impossible to be able to program in any language 'properly' without an understanding of them and what's going on behind the scenes. The F# suggestion elsewhere looks interesting :-D

                  Dave
                  BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                  Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                  1 Reply Last reply
                  0
                  • D dmitri_sps

                    I'd agree with others that you'd better not try a new language on entire project, but hey, you can write some components in managed C++, just for the fun of it. Then you can write some in un-managed C++, to feel the difference. With C++ you will get - different kind of templates (sorely missed by me in C# and Java): templates that allow to apply patterns to un-related classes - destructors to manage external resources (instead of using the "using" construct) And with unmanaged C++ you will also get multiple inheritance. Just do not use pointers - use smart pointers or shared pointers (download "boost" library for example) or write your own smart-pointer template ;P

                    M Offline
                    M Offline
                    mohit mayank
                    wrote on last edited by
                    #31

                    hi all! well i m student and a kid for you guys. i learned native C++ at college. i started codeing in VB6 for fun. thn moved to VS 2008 and found VC++ familier. i love coding in VC++ and VB .net. I am Working on stock market simulation software. Will it be good for me to learn C# and ASP now. I have to finish the software in one month. i have developed the database in Mysql and Client side of the game in C++. also I have to search for a job next year. Mohit

                    J 1 Reply Last reply
                    0
                    • D DaveyM69

                      I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                      Dave
                      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #32

                      ~Just do it in C#, and dont tell them so u wil still have enought time to experiment in managed C++ In this way, u wil do it in both and make gud use of time u have, n will know yourself that managed c# is of no use :-D

                      Ravie Busie Coding is my birth-right and bugs are part of feature my code has!

                      1 Reply Last reply
                      0
                      • J Joe Woodbury

                        Managed C++ is obsolete; it's now called C++/CLI and it's a pain in the ass. Yes, it has some nice things about it, but for me its eccentricities outweigh its benefits outside of very narrow application.

                        Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                        M Offline
                        M Offline
                        Mike Diack
                        wrote on last edited by
                        #33

                        I'd have to agree with Joe Woodbury - though I don't think Anna-Jayne would agree with me. As far as I'm concerned: Managed C++ is a syntactic mess, relatively non-portable and isn't as well supported as either mainstream (unmanaged) C++ nor (the arguably easier to use) C#. For me it's a badly thought out compromise that doesn't really succeed in any way. I know Anna-Jayne will disagree though. From what I've seen managed C++ is a largely dead language. Mike

                        A 1 Reply Last reply
                        0
                        • M Mike Diack

                          I'd have to agree with Joe Woodbury - though I don't think Anna-Jayne would agree with me. As far as I'm concerned: Managed C++ is a syntactic mess, relatively non-portable and isn't as well supported as either mainstream (unmanaged) C++ nor (the arguably easier to use) C#. For me it's a badly thought out compromise that doesn't really succeed in any way. I know Anna-Jayne will disagree though. From what I've seen managed C++ is a largely dead language. Mike

                          A Offline
                          A Offline
                          aabsgeek
                          wrote on last edited by
                          #34

                          I would third that. Go with C# if you want to do managed code and if you have any performance critical code create some native c++ code in a dll. Richard

                          1 Reply Last reply
                          0
                          • D DaveyM69

                            I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                            Dave
                            BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                            Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                            J Offline
                            J Offline
                            Joe Woodbury
                            wrote on last edited by
                            #35

                            Native C++. More specifically; procedural C++. Yeah, sounds whacky, but extremely useful in truly understanding how Windows really works. It also helps in understanding the OOP is merely a construct; beneath it all, it's procedural code. It has been my experience that engineers who understand Win32 and how .NET really works under the covers write more efficient code than those that don't and are, in general, better C# developers (yes, there are plenty of exceptions, but given the choice of hiring a C# developer with no C++ experience and one with, everything else equal, I'll take the latter.)

                            Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke

                            1 Reply Last reply
                            0
                            • D DaveyM69

                              I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                              Dave
                              BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                              Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                              J Offline
                              J Offline
                              Jason Christian
                              wrote on last edited by
                              #36

                              Why go backwards?

                              1 Reply Last reply
                              0
                              • J Judah Gabriel Himango

                                C++/CLI is really good for native interop. I wouldn't develop a fully managed app purely in C++/CLI, no. It still doesn't feel like a first-class .NET language, IMO.

                                Tech, life, family, faith: Give me a visit. The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

                                F Offline
                                F Offline
                                fredsparkle
                                wrote on last edited by
                                #37

                                We have a heavy weight MFC app and we simply include one /CLR compiled module in the main app to get .NET running early and then call a /CLR compiled bridge DLL to add new functionality from .NET dll's.

                                1 Reply Last reply
                                0
                                • D DaveyM69

                                  I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                                  Dave
                                  BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                                  Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                                  J Offline
                                  J Offline
                                  JaeLee4
                                  wrote on last edited by
                                  #38

                                  I code in both C# and C++ (I've been doing C++ for over ten years now, C# for two years). C# is much easier, hands down, and given a choice I always go for C#. There are cases, however, where going C++ makes sense, esp where the client machine isn't expected to have the .NET framework. I'd go ahead and code your new project in C++ using VS2k8. It's one thing to read about using the Win32 and STL, quite another learning coding it. I would try to use generics for any collection classes and use patterns (such as the command pattern to encapsulate GUI commands/verbs). Bonus points would be to use background threads to update any GUI controls (such as a listbox) without crashing your app (you'll have to create delegates to safely update the control). C++ is still in use, and I don't expect it go away anytime soon... but I'd rather make my living in C# since (to me at least) it's so much easier. Congrats on your new job!

                                  1 Reply Last reply
                                  0
                                  • M mohit mayank

                                    hi all! well i m student and a kid for you guys. i learned native C++ at college. i started codeing in VB6 for fun. thn moved to VS 2008 and found VC++ familier. i love coding in VC++ and VB .net. I am Working on stock market simulation software. Will it be good for me to learn C# and ASP now. I have to finish the software in one month. i have developed the database in Mysql and Client side of the game in C++. also I have to search for a job next year. Mohit

                                    J Offline
                                    J Offline
                                    James Hugard
                                    wrote on last edited by
                                    #39

                                    F#[^], it's non .NET sibling OCaml[^] and pure (standalone) cousin Haskell[^], appear to be making inroads with the financial sector[^]. Can't say if they will dethrone SmallTalk[^], since I'm not in the business, but makes Functional Programming worth a look. However, having written code for over 30 years in many languages, I found F# and Functional Programming to be one of those "mind bending" experiences like going from BASIC (and Assembly) to Pascal, from Pascal (and C) to C++, and now again from C++ to F#. Now that I understand the syntax, I (usually) find F# to be the most readable of the languages I know, and quite a lot of fun to write in, especially when "coding in the small[^]."

                                    1 Reply Last reply
                                    0
                                    • D DaveyM69

                                      I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                                      Dave
                                      BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                                      Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                                      J Offline
                                      J Offline
                                      Jeremy Hutchinson
                                      wrote on last edited by
                                      #40

                                      One thing to consider when choosing a language is who is going to maintain it. You don't have any experience in C++ and there is a chance you'll realize you hate it after you've gotten far enough along witting this application that you couldn't start over. Then you're stuck finishing and maintaining the code until you leave that job. When you leave that job your employer now needs to hire someone who has Managed C++ experience in whatever any other custom applications are written in. You've expanded you're skills to the detriment of your employer. That being said, if I were going to start exploring a new language, I would start exploring WPF. I hated it the first week, but after I got the hang of it, I quickly grew to love it. You're expanding your skills, but within the realm of C#. You should also check out ADO.Net Data Service, Entity Framework, Linq. All powerful tools to put in your belt.

                                      1 Reply Last reply
                                      0
                                      • D DaveyM69

                                        I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                                        Dave
                                        BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                                        Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                                        J Offline
                                        J Offline
                                        Jim Crafton
                                        wrote on last edited by
                                        #41

                                        If you're gonna do C++, and don't want to deal with MFC, check out the VCF[^], it's got a lot of the same things you probably like about .Net and C#, but it's done with native C++.

                                        ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                                        1 Reply Last reply
                                        0
                                        • D DaveyM69

                                          I do all my coding in C# nowadays. I'm ashamed to admit it :-O , but before .NET it was VB for me and before that plain old BASIC. I've done a little assembly too so I'm not scared of getting 'lower' level. I've just landed a new job (woohoo!) and part of it will be developing a bespoke application. There are no time limits on this and I'll be working on it alone, so I wondered if you guys thought it might be worth the effort of going down the C++ route (is managed C++ that much different to C#?) to broaden my experience? I could code it in C# but I fancy learning something that may prove to be useful. If not managed C++, what would you recommend?

                                          Dave
                                          BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
                                          Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

                                          A Offline
                                          A Offline
                                          Alex Espinoza
                                          wrote on last edited by
                                          #42

                                          I personally think you should choose the language that fits the project you are working on. And even if learning a new language is fun, I don't think you should just choose a language because of fun. Remember that the application you create will have to be maintained sooner or later by somebody else than you. If you create it in a language that not everybody is comfortable using, you'll have trouble finding somebody who will maintain it successfully. Now, talking about fun, I have never used Managed C++, I got into the new revision which is called C++/CLI, and I loved it. I have a C++ background and the ability to use the .Net library and native libraries at the same time on the same module is just way too much power. In my opinion, C++/CLI is worth learning. Especially if you like low level stuff. I would use C++/CLI on: * Projects were integration with native modules is required. * Projects were performance on certain parts of the application are needed. * Projects were the need to use the full power of Concurrency is needed. Hope that helps, Alex.

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups