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. C++ again :-) (Does C# make you dumber?)

C++ again :-) (Does C# make you dumber?)

Scheduled Pinned Locked Moved The Lounge
csharpc++comquestion
74 Posts 34 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.
  • N Nemanja Trifunovic

    Anders Molin wrote:

    It's good to get my hands on a C++ compiler again, I've spent way too much time in C#.

    I know the feeling :) I spent a good part of 1994 2004 and 1995 2005 (:doh:) using C# as the primary language (along with some Managed C++) and C++ only for maintenance and it felt very good to get back to pure C++. Not only the language is more powerful, but the coworkers are more skillful and professional - there were too many ex-VB'ers around in the C# days :| The only downside is the platform: Linux. While it is fun to use vi, debugging with gdb is a royal pain.


    My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it. -- modified at 7:02 Tuesday 13th June, 2006

    V Offline
    V Offline
    Vikram A Punathambekar
    wrote on last edited by
    #10

    Nemanja Trifunovic wrote:

    I spent a good part of 1994 and 1995 using C# as the primary language

    What are you talking about? :wtf: š Cheers, Vikram.


    I don't know and you don't either. Militant Agnostic

    1 Reply Last reply
    0
    • A Anders Molin

      Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #11

      My work for Code Project is currently all C++, and I am loving it. Having said that, I still enjoy the C# work that I do. I'd love to do some ASP.NET 2.0 work, Winforms is getting a bit boring though, I have to admit. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      T 1 Reply Last reply
      0
      • R Ryan Roberts

        1994? Thats pretty early adoption :)

        Nemanja Trifunovic wrote:

        While it is fun to use vi

        :omg: Ryan

        "Michael Moore and Mel Gibson are the same person, except for a few sit-ups. Moore thought his cheesy political blooper reel was going to tell people how to vote. Mel thought that his little gay SM movie about his imaginary friend was going to help him get to heaven." - Penn Jillette

        N Offline
        N Offline
        Nemanja Trifunovic
        wrote on last edited by
        #12

        Ryan Roberts wrote:

        1994? Thats pretty early adoption

        Nah, it's just too early here and I didn't have my morning cofee yet :)


        My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

        1 Reply Last reply
        0
        • N NormDroid

          Anders Molin wrote:

          Does C# make you dum

          No it makes me more productive on every aspect of windows programming. Never send a human to do a machine's job Agent Smith

          N Offline
          N Offline
          Nemanja Trifunovic
          wrote on last edited by
          #13

          norm.net wrote:

          No it makes me more productive on every aspect of windows programming.

          Then you should have switched to VB 10 years ago :)


          My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

          N 1 Reply Last reply
          0
          • N Nemanja Trifunovic

            norm.net wrote:

            No it makes me more productive on every aspect of windows programming.

            Then you should have switched to VB 10 years ago :)


            My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #14

            No you're missing the 'more productive' part of my statement ;P Any I've done my 10 year stint with MFC/COM/ATL/Win32 find c# and .net a refreshing change, plus I get to design some really good UIs which would of taken man years in MFC/WTL. Never send a human to do a machine's job Agent Smith

            N 1 Reply Last reply
            0
            • N Nemanja Trifunovic

              Anders Molin wrote:

              It's good to get my hands on a C++ compiler again, I've spent way too much time in C#.

              I know the feeling :) I spent a good part of 1994 2004 and 1995 2005 (:doh:) using C# as the primary language (along with some Managed C++) and C++ only for maintenance and it felt very good to get back to pure C++. Not only the language is more powerful, but the coworkers are more skillful and professional - there were too many ex-VB'ers around in the C# days :| The only downside is the platform: Linux. While it is fun to use vi, debugging with gdb is a royal pain.


              My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it. -- modified at 7:02 Tuesday 13th June, 2006

              N Offline
              N Offline
              NormDroid
              wrote on last edited by
              #15

              I suppose it's horses for courses. Never send a human to do a machine's job Agent Smith

              1 Reply Last reply
              0
              • N NormDroid

                No you're missing the 'more productive' part of my statement ;P Any I've done my 10 year stint with MFC/COM/ATL/Win32 find c# and .net a refreshing change, plus I get to design some really good UIs which would of taken man years in MFC/WTL. Never send a human to do a machine's job Agent Smith

                N Offline
                N Offline
                Nemanja Trifunovic
                wrote on last edited by
                #16

                norm.net wrote:

                Any I've done my 10 year stint with MFC/COM/ATL/Win32 find c# and .net a refreshing change, plus I get to design some really good UIs which would of taken man years in MFC/WTL.

                Again, how's that different from VB6? I used it and it was really great for putting some UI together quickly, just like with C# and WinForms. ASP.NET is way more advanced than "classic" ASP, but for desktop form-based applications I see no real advantage of .NET compared to VB6.


                My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                N B 2 Replies Last reply
                0
                • N NormDroid

                  Anders Molin wrote:

                  Does C# make you dum

                  No it makes me more productive on every aspect of windows programming. Never send a human to do a machine's job Agent Smith

                  G Offline
                  G Offline
                  Gary R Wheeler
                  wrote on last edited by
                  #17

                  norm.net wrote:

                  on every aspect of windows programming

                  Oh yeah? Write one of the following in C#: Service, device driver, Shell extension, SNMP extension DLL, ISAPI extension, the list goes on. Any software that integrates with the operating system (at least under XP), by definition, can not be implemented in C#, or any other managed language for that matter. The situation may be different under Vista, as MS is moving toward managed interfaces for more OS functionality. C# is not the universal hammer for every nail in the Windows programming world.


                  Software Zen: delete this;

                  Fold With Us![^]

                  E N R 3 Replies Last reply
                  0
                  • G Gary R Wheeler

                    norm.net wrote:

                    on every aspect of windows programming

                    Oh yeah? Write one of the following in C#: Service, device driver, Shell extension, SNMP extension DLL, ISAPI extension, the list goes on. Any software that integrates with the operating system (at least under XP), by definition, can not be implemented in C#, or any other managed language for that matter. The situation may be different under Vista, as MS is moving toward managed interfaces for more OS functionality. C# is not the universal hammer for every nail in the Windows programming world.


                    Software Zen: delete this;

                    Fold With Us![^]

                    E Offline
                    E Offline
                    Eytukan
                    wrote on last edited by
                    #18

                    Add this too.. A CTI application for your PBX :-D


                    --[:jig:]-- [My Current Status]

                    1 Reply Last reply
                    0
                    • G Gary R Wheeler

                      norm.net wrote:

                      on every aspect of windows programming

                      Oh yeah? Write one of the following in C#: Service, device driver, Shell extension, SNMP extension DLL, ISAPI extension, the list goes on. Any software that integrates with the operating system (at least under XP), by definition, can not be implemented in C#, or any other managed language for that matter. The situation may be different under Vista, as MS is moving toward managed interfaces for more OS functionality. C# is not the universal hammer for every nail in the Windows programming world.


                      Software Zen: delete this;

                      Fold With Us![^]

                      N Offline
                      N Offline
                      NormDroid
                      wrote on last edited by
                      #19

                      Service - Can be done! Device Driver - No Shell Extension - Can be done with interop SNMP extension - No ISAPI extension - No But there again I don't program these models daily, do you? If I need to do any of the follow I'd probably revert to ATL, which I have no problems with and I am quite experienced in using. For instance I'm developing a networking discovery tool which scans multiple lans to ather information about DNS/ARP/Netbios/Ping/WMI/SNMP etc and produces nice results/diagrams ALL written using C#, this type of application would of taken months to develop using tradition methods (ATL/MFC/WTL/etc etc.) - get the point. I use C# because it allows me to get the job done quicker. C# is not the universal hammer for every nail in the Windows programming world. Yes I totally agree, but I've found over the past 3 years, where I was using C++, I'm using C#. Never send a human to do a machine's job Agent Smith -- modified at 7:58 Tuesday 13th June, 2006

                      1 Reply Last reply
                      0
                      • N Nemanja Trifunovic

                        norm.net wrote:

                        Any I've done my 10 year stint with MFC/COM/ATL/Win32 find c# and .net a refreshing change, plus I get to design some really good UIs which would of taken man years in MFC/WTL.

                        Again, how's that different from VB6? I used it and it was really great for putting some UI together quickly, just like with C# and WinForms. ASP.NET is way more advanced than "classic" ASP, but for desktop form-based applications I see no real advantage of .NET compared to VB6.


                        My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                        N Offline
                        N Offline
                        NormDroid
                        wrote on last edited by
                        #20

                        Nemanja Trifunovic wrote:

                        Again, how's that different from VB6? I

                        Richer framework, making fine granular custom controls (like masked edit boxes/grids etc). You obviously don't use .net that well, we can discuss all day, you have the right to your opinions and I have mine, maybe your right, .net is a waste of time and we should stick with VB6 (not that I have or would ever use it X| ) :zzz: Never send a human to do a machine's job Agent Smith

                        N Y 2 Replies Last reply
                        0
                        • C Christian Graus

                          My work for Code Project is currently all C++, and I am loving it. Having said that, I still enjoy the C# work that I do. I'd love to do some ASP.NET 2.0 work, Winforms is getting a bit boring though, I have to admit. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                          T Offline
                          T Offline
                          ToddHileHoffer
                          wrote on last edited by
                          #21

                          I have been doing nothing but asp.net for the last 4 years. With 2.0 they finally have web programming done right. It only took until 2005, but finally they did it right. ASP.Net is the most fun in my opinion because you code C#, JavaScript and HTML. You really have to know all 3 as well as SQL. On the C++, I've never used it at work and can't imagine having to. It would simply be over kill for business applications. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

                          C 1 Reply Last reply
                          0
                          • C Corinna John

                            If you get paid by the hour, C++ is much better than C# ... more mistakes possible, more time needed to fix them, more hours for you. :cool: _____________________________________________________________________________ I don't expect too much, all I want is your vote for Halbsichtigkeit.

                            R Offline
                            R Offline
                            realJSOP
                            wrote on last edited by
                            #22

                            I don't now about the rest of you, but I spend significantly more time on new code than I do going back to fix bugs in old code. Maybe Mr. Corinna has found a comfort zone in C# that was unattainable for him in C++. ;P

                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                            V N L 3 Replies Last reply
                            0
                            • T ToddHileHoffer

                              I have been doing nothing but asp.net for the last 4 years. With 2.0 they finally have web programming done right. It only took until 2005, but finally they did it right. ASP.Net is the most fun in my opinion because you code C#, JavaScript and HTML. You really have to know all 3 as well as SQL. On the C++, I've never used it at work and can't imagine having to. It would simply be over kill for business applications. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

                              C Offline
                              C Offline
                              Christian Graus
                              wrote on last edited by
                              #23

                              My day job was ASP.NET for about the last 4 years, but mostly on one project, so no move to 2.0. I've heard some things about 2.0 that make me think it's a step backwards, such as the recommendation to put code in the aspx file, instead of code behind. Is that true ? I'd love to play with the new features, but I wouldn't say there was anything *broken* about 1.1.

                              ToddHileHoffer wrote:

                              On the C++, I've never used it at work and can't imagine having to. It would simply be over kill for business applications.

                              Sadly, I guess that is true nowadays. I remember when it was the only game in town. I still like it more than C#, a lot of the time. C# has lots of cool stuff in it, but C++ just feels right to me. Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

                              T R L 3 Replies Last reply
                              0
                              • A Anders Molin

                                Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]

                                T Offline
                                T Offline
                                ToddHileHoffer
                                wrote on last edited by
                                #24

                                It is funny, even though the .net framework is like a babysitter and holds your hand through the entire process of coding an application people still manage to screw it up all the time. Granted, I have only worked in two offices in the last 4 years but it amazes me how many people (especially with VB.Net) pretend to be programmers. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

                                1 Reply Last reply
                                0
                                • N NormDroid

                                  Nemanja Trifunovic wrote:

                                  Again, how's that different from VB6? I

                                  Richer framework, making fine granular custom controls (like masked edit boxes/grids etc). You obviously don't use .net that well, we can discuss all day, you have the right to your opinions and I have mine, maybe your right, .net is a waste of time and we should stick with VB6 (not that I have or would ever use it X| ) :zzz: Never send a human to do a machine's job Agent Smith

                                  N Offline
                                  N Offline
                                  Nemanja Trifunovic
                                  wrote on last edited by
                                  #25

                                  norm.net wrote:

                                  maybe your right, .net is a waste of time and we should stick with VB6

                                  And when did I say that? All I said is that you should have switched from MFC/ATL/whatever to VB in mid 1990's. You have obviously used C++ for wrong purposes.

                                  norm.net wrote:

                                  VB6 (not that I have or would ever use it

                                  And yet you have a pretty strong opinion on it :)


                                  My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                                  N 1 Reply Last reply
                                  0
                                  • A Anders Molin

                                    Just got a 6-month contract with a client. I'll spend the time at their location coding C++... It's good to get my hands on a C++ compiler again, I've spent way too much time in C#. I know it's not popular to say, but I still think C# makes programmers dumber and more lazy, not to mention that it's way more boring than C++ ;) - Anders My new photo website[^]

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #26

                                    Anders Molin wrote:

                                    Just got a 6-month contract with a client.

                                    Congrats! Different client, I take it?

                                    Anders Molin wrote:

                                    but I still think C# makes programmers dumber and more lazy

                                    Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):

                                    public bool Foo(string a, string b)
                                    {
                                    bool ret = false;
                                    if (Bar(a) == Fizbin(b))
                                    {
                                    ret = true;
                                    }
                                    return ret;
                                    }

                                    Wow. All that to say:

                                    public bool Foo(string a, string b)
                                    {
                                    return Bar(a) == Fizbin(b);
                                    }

                                    Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006

                                    B T N M K 5 Replies Last reply
                                    0
                                    • M Marc Clifton

                                      Anders Molin wrote:

                                      Just got a 6-month contract with a client.

                                      Congrats! Different client, I take it?

                                      Anders Molin wrote:

                                      but I still think C# makes programmers dumber and more lazy

                                      Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):

                                      public bool Foo(string a, string b)
                                      {
                                      bool ret = false;
                                      if (Bar(a) == Fizbin(b))
                                      {
                                      ret = true;
                                      }
                                      return ret;
                                      }

                                      Wow. All that to say:

                                      public bool Foo(string a, string b)
                                      {
                                      return Bar(a) == Fizbin(b);
                                      }

                                      Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006

                                      B Offline
                                      B Offline
                                      BrockVnm
                                      wrote on last edited by
                                      #27

                                      Marc Clifton wrote:

                                      public bool Foo(string a, string b) { bool ret = false; if (Bar(a) == Fizbin(b)) { ret = true; } return ret; }

                                      I see this all the time. I am constantly fixing things like this all day long. I agree it does not matter what language people are using, a bad developer is always going to be a bad developer.

                                      K 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        Anders Molin wrote:

                                        Just got a 6-month contract with a client.

                                        Congrats! Different client, I take it?

                                        Anders Molin wrote:

                                        but I still think C# makes programmers dumber and more lazy

                                        Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):

                                        public bool Foo(string a, string b)
                                        {
                                        bool ret = false;
                                        if (Bar(a) == Fizbin(b))
                                        {
                                        ret = true;
                                        }
                                        return ret;
                                        }

                                        Wow. All that to say:

                                        public bool Foo(string a, string b)
                                        {
                                        return Bar(a) == Fizbin(b);
                                        }

                                        Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006

                                        T Offline
                                        T Offline
                                        ToddHileHoffer
                                        wrote on last edited by
                                        #28

                                        Well said, scored a 5. how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06

                                        M 1 Reply Last reply
                                        0
                                        • M Marc Clifton

                                          Anders Molin wrote:

                                          Just got a 6-month contract with a client.

                                          Congrats! Different client, I take it?

                                          Anders Molin wrote:

                                          but I still think C# makes programmers dumber and more lazy

                                          Well, I would argue that anything above throwing toggle switches on the front panel of a PDP-11 makes programmers dumber and more lazy. But it also separates the wheat from the chaf. For example, C#'s lock statement is great: (from MSDN mag): You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically. Does this make a programmer dumber? No. In C++, a dumb programmer wouldn't realize that he has to manually release locks in an exception handler. What C# does is make on more productive, and yes, it helps dumb programmers from making dumb mistakes that other people then have to fix. Lazy? No, again, I think C# makes a programmer, especially an experienced programmer, more productive. Dumb programmers will be dumb regardless of the language. Look at this code I recently came across (names of have been changed to protect the dumb):

                                          public bool Foo(string a, string b)
                                          {
                                          bool ret = false;
                                          if (Bar(a) == Fizbin(b))
                                          {
                                          ret = true;
                                          }
                                          return ret;
                                          }

                                          Wow. All that to say:

                                          public bool Foo(string a, string b)
                                          {
                                          return Bar(a) == Fizbin(b);
                                          }

                                          Isn't that amazing? And that's totally language independent. You wouldn't know whether that was C#, C++, or even C [edit]well, except for that little "public" token, hehehe [/edit] Well anyways, that's my 2c. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson -- modified at 8:13 Tuesday 13th June, 2006

                                          N Offline
                                          N Offline
                                          Nemanja Trifunovic
                                          wrote on last edited by
                                          #29

                                          Marc Clifton wrote:

                                          You should always use exception handling with thread synchronization mechanisms to ensure that locks are released properly. If you use the C# lock statement, the compiler writes the proper code for you automatically.

                                          Actually, this is a perfect example where C++ is easier than C#. Take a look at RAII[^] idiom. All you need to do is to create a local object that takes a lock and releases it automatically when it goes out of scope. Even better - with C++ you can use the same idiom for any resource, not just thread locks.


                                          My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.

                                          M 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