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. Is the new C++ as easy to use as Python?

Is the new C++ as easy to use as Python?

Scheduled Pinned Locked Moved The Lounge
c++pythoncomquestionannouncement
40 Posts 17 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.
  • S Offline
    S Offline
    swampwiz
    wrote on last edited by
    #1

    This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

    R Sander RosselS D M N 7 Replies Last reply
    0
    • S swampwiz

      This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

      R Offline
      R Offline
      Rick York
      wrote on last edited by
      #2

      I think it is, for the most part. His whining about compile times is understandable because most people don't seem to know how to write header files with that in mind. PIMPL being not used enough is another cause.

      "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

      1 Reply Last reply
      0
      • S swampwiz

        This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

        Sander RosselS Offline
        Sander RosselS Offline
        Sander Rossel
        wrote on last edited by
        #3

        Sure, I can't use either :)

        Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

        1 Reply Last reply
        0
        • S swampwiz

          This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

          D Offline
          D Offline
          Dean Roddey
          wrote on last edited by
          #4

          Modern C++ is very complex and the bulk of people who use it probably don't understand half of the details. It's vastly over-templated. It's not really possible to keep build times low when you have enormous amounts of templated code in a large code base because all that code is inlined. A lot of folks in the 'modern' camp seem to have convinced themselves that inheritance is evil, and will jump through fairly ridiculous hoops not to use it, using horrendously ugly stuff like the standard variant stuff and basically doing what OO was invented to avoid (lots of switch statements everywhere, and standard variant is just a particularly ugly switch statement.) A huge amount of effort was spent creating a seriously over-engineered container system, while leaving fundamental stuff not dealt with, and leaving C++ in a situation where even now you can't write even a modest practical application without third party libraries.

          Explorans limites defectum

          S J T S C 6 Replies Last reply
          0
          • D Dean Roddey

            Modern C++ is very complex and the bulk of people who use it probably don't understand half of the details. It's vastly over-templated. It's not really possible to keep build times low when you have enormous amounts of templated code in a large code base because all that code is inlined. A lot of folks in the 'modern' camp seem to have convinced themselves that inheritance is evil, and will jump through fairly ridiculous hoops not to use it, using horrendously ugly stuff like the standard variant stuff and basically doing what OO was invented to avoid (lots of switch statements everywhere, and standard variant is just a particularly ugly switch statement.) A huge amount of effort was spent creating a seriously over-engineered container system, while leaving fundamental stuff not dealt with, and leaving C++ in a situation where even now you can't write even a modest practical application without third party libraries.

            Explorans limites defectum

            S Offline
            S Offline
            Super Lloyd
            wrote on last edited by
            #5

            Well.. C++ multiple inheritance is always full of surprise, isn't it?! :o

            A new .NET Serializer All in one Menu-Ribbon Bar Taking over the world since 1371!

            1 Reply Last reply
            0
            • D Dean Roddey

              Modern C++ is very complex and the bulk of people who use it probably don't understand half of the details. It's vastly over-templated. It's not really possible to keep build times low when you have enormous amounts of templated code in a large code base because all that code is inlined. A lot of folks in the 'modern' camp seem to have convinced themselves that inheritance is evil, and will jump through fairly ridiculous hoops not to use it, using horrendously ugly stuff like the standard variant stuff and basically doing what OO was invented to avoid (lots of switch statements everywhere, and standard variant is just a particularly ugly switch statement.) A huge amount of effort was spent creating a seriously over-engineered container system, while leaving fundamental stuff not dealt with, and leaving C++ in a situation where even now you can't write even a modest practical application without third party libraries.

              Explorans limites defectum

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

              Dean Roddey wrote:

              you can't write even a modest practical application without third party libraries.

              I respectfully disagree. I've written several useful utilities using "pure" C++ (and the standard library.) Adding third party libraries make it even more rich, as it does with every language, including Python. I'm now working on a server which uses asio, rapidJson, OpenSSL and LZ4 and SQLite. However, the majority of the code is "straight" C++.

              D 1 Reply Last reply
              0
              • J Joe Woodbury

                Dean Roddey wrote:

                you can't write even a modest practical application without third party libraries.

                I respectfully disagree. I've written several useful utilities using "pure" C++ (and the standard library.) Adding third party libraries make it even more rich, as it does with every language, including Python. I'm now working on a server which uses asio, rapidJson, OpenSSL and LZ4 and SQLite. However, the majority of the code is "straight" C++.

                D Offline
                D Offline
                Dean Roddey
                wrote on last edited by
                #7

                I'm not sure I'd consider a utility to be a practical end user type application. Anyhoo, it's at a significant disadvantage relative to languages like C# or Java that have far more built in functionality. And it's far less likely that your experience working on project A will apply to project B when you move to another company.

                Explorans limites defectum

                J 2 Replies Last reply
                0
                • D Dean Roddey

                  I'm not sure I'd consider a utility to be a practical end user type application. Anyhoo, it's at a significant disadvantage relative to languages like C# or Java that have far more built in functionality. And it's far less likely that your experience working on project A will apply to project B when you move to another company.

                  Explorans limites defectum

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

                  Dean Roddey wrote:

                  And it's far less likely that your experience working on project A will apply to project B when you move to another company.

                  Quite to the contrary. My C++ experience has transferred extremely well through the recent years and multiple contracts/short term jobs. In my most recent project, I easily cut months (no exaggeration) off the development time because of this.

                  1 Reply Last reply
                  0
                  • D Dean Roddey

                    I'm not sure I'd consider a utility to be a practical end user type application. Anyhoo, it's at a significant disadvantage relative to languages like C# or Java that have far more built in functionality. And it's far less likely that your experience working on project A will apply to project B when you move to another company.

                    Explorans limites defectum

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

                    Dean Roddey wrote:

                    I'm not sure I'd consider a utility to be a practical end user type application.

                    I'll let my users know :)

                    1 Reply Last reply
                    0
                    • D Dean Roddey

                      Modern C++ is very complex and the bulk of people who use it probably don't understand half of the details. It's vastly over-templated. It's not really possible to keep build times low when you have enormous amounts of templated code in a large code base because all that code is inlined. A lot of folks in the 'modern' camp seem to have convinced themselves that inheritance is evil, and will jump through fairly ridiculous hoops not to use it, using horrendously ugly stuff like the standard variant stuff and basically doing what OO was invented to avoid (lots of switch statements everywhere, and standard variant is just a particularly ugly switch statement.) A huge amount of effort was spent creating a seriously over-engineered container system, while leaving fundamental stuff not dealt with, and leaving C++ in a situation where even now you can't write even a modest practical application without third party libraries.

                      Explorans limites defectum

                      T Offline
                      T Offline
                      Tim Deveaux
                      wrote on last edited by
                      #10

                      Dean Roddey wrote:

                      while leaving fundamental stuff not dealt with

                      Like what?

                      D 1 Reply Last reply
                      0
                      • T Tim Deveaux

                        Dean Roddey wrote:

                        while leaving fundamental stuff not dealt with

                        Like what?

                        D Offline
                        D Offline
                        Dean Roddey
                        wrote on last edited by
                        #11

                        Language-wise decent enumerations would be a big one IMO. Otherwise, a vast swath of functionality that things like C# has built in that are important to most practical applications. Sockets, text transcoding, loadable resources, XML, JSON, HTTP, MVC, graphic file formats, image manipulation, a good streaming system, RPC of some number of types, and on and on. Look, don't get me wrong, I probably have 10 times the vested interest in C++ than all of you put together. But as it stands right now, it's got problems. I know what it's like to work in a C++ system with all those things and much, much more since I've created one. That's what C++ should be like by now.

                        Explorans limites defectum

                        T 1 Reply Last reply
                        0
                        • D Dean Roddey

                          Language-wise decent enumerations would be a big one IMO. Otherwise, a vast swath of functionality that things like C# has built in that are important to most practical applications. Sockets, text transcoding, loadable resources, XML, JSON, HTTP, MVC, graphic file formats, image manipulation, a good streaming system, RPC of some number of types, and on and on. Look, don't get me wrong, I probably have 10 times the vested interest in C++ than all of you put together. But as it stands right now, it's got problems. I know what it's like to work in a C++ system with all those things and much, much more since I've created one. That's what C++ should be like by now.

                          Explorans limites defectum

                          T Offline
                          T Offline
                          Tim Deveaux
                          wrote on last edited by
                          #12

                          Dean Roddey wrote:

                          a vast swath of functionality that things like C# has built in

                          were written in C++. What's your point?

                          D 1 Reply Last reply
                          0
                          • T Tim Deveaux

                            Dean Roddey wrote:

                            a vast swath of functionality that things like C# has built in

                            were written in C++. What's your point?

                            D Offline
                            D Offline
                            Dean Roddey
                            wrote on last edited by
                            #13

                            Well, part of my point is that your point would be a lot more interesting if you could USE that code in C++, which you can't, so it's sort of a moot point.

                            Explorans limites defectum

                            N T 2 Replies Last reply
                            0
                            • D Dean Roddey

                              Well, part of my point is that your point would be a lot more interesting if you could USE that code in C++, which you can't, so it's sort of a moot point.

                              Explorans limites defectum

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

                              Do you want to use .Net in Assembly too?

                              M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                              1 Reply Last reply
                              0
                              • D Dean Roddey

                                Well, part of my point is that your point would be a lot more interesting if you could USE that code in C++, which you can't, so it's sort of a moot point.

                                Explorans limites defectum

                                T Offline
                                T Offline
                                Tim Deveaux
                                wrote on last edited by
                                #15

                                Well, I take your point - reuse is good. Having a complete library is good. But we are primitive monkeys. We compete with OS's. We compete with API's. We compete with whatever's on the browsers' default. I don't want a language that does everything. I want a language that can do everything. When you come up with something better than C++ lemme know. Cheers T

                                D 1 Reply Last reply
                                0
                                • S swampwiz

                                  This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

                                  M Offline
                                  M Offline
                                  Member 9167057
                                  wrote on last edited by
                                  #16

                                  Yes and no. The biggest problem by far is C++'s compatibility with C and modern C++'s compatibility with ancient C++. Meaning if you look for tutorials or ask in forums, you may and very much will come across information from the days of old, when C++ had all the disadvantages of low-level C and high-level-languages combined without any advantages. Well, this sentence is somewhat exaggerated, but the point stands: There's too much reading material on C++ and too many C++ programmers stuck in the past. To take advantage of modern C++, you need to understand when you're facing old C++ and avoid that. That said, modern C++ itself isn't quite as easy to use as Python as you still have the static typing system, but once you learn to use it properly, it's a) actually darn easy to use (and you can kill a huge lot of difficulties by typing everything as auto) and b) the compiler catches tons of errors due to said static typing and the overall more static nature of the language. Short: It's more complicated to quickly prototype in but the investment pays back huge when you build complex software that needs to bloody hell run. Still, the overhead of avoiding all the legacy crap is rather substantial. I dearly wish the C++ committee came up with a modern mode. Let's say, unless a code file contains a #pragma(IAmStuckInThePast), every non-modern construct for which there's a modern replacement is a compiler error.

                                  M D 2 Replies Last reply
                                  0
                                  • S swampwiz

                                    This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

                                    N Offline
                                    N Offline
                                    Nand32
                                    wrote on last edited by
                                    #17

                                    I learned C++ the hard way. God, keep it hard- always.

                                    1 Reply Last reply
                                    0
                                    • M Member 9167057

                                      Yes and no. The biggest problem by far is C++'s compatibility with C and modern C++'s compatibility with ancient C++. Meaning if you look for tutorials or ask in forums, you may and very much will come across information from the days of old, when C++ had all the disadvantages of low-level C and high-level-languages combined without any advantages. Well, this sentence is somewhat exaggerated, but the point stands: There's too much reading material on C++ and too many C++ programmers stuck in the past. To take advantage of modern C++, you need to understand when you're facing old C++ and avoid that. That said, modern C++ itself isn't quite as easy to use as Python as you still have the static typing system, but once you learn to use it properly, it's a) actually darn easy to use (and you can kill a huge lot of difficulties by typing everything as auto) and b) the compiler catches tons of errors due to said static typing and the overall more static nature of the language. Short: It's more complicated to quickly prototype in but the investment pays back huge when you build complex software that needs to bloody hell run. Still, the overhead of avoiding all the legacy crap is rather substantial. I dearly wish the C++ committee came up with a modern mode. Let's say, unless a code file contains a #pragma(IAmStuckInThePast), every non-modern construct for which there's a modern replacement is a compiler error.

                                      M Offline
                                      M Offline
                                      Mike Winiberg
                                      wrote on last edited by
                                      #18

                                      I think you've hit the nail on the head - the vast baggage that comes along with C++'s attempts to retain (at least superficially) compatibility with the past iterations makes it both incredibly difficult to ensure you are up to date and using the 'correct' constructs, and also means - unless you can avoid using/calling legacy code etc - that there are so many possible ways of doing things that it has become 'too difficult' to use unless you are immersed. I gave up developing in C++ for the most part when I realised it was taking me more time and effort to understand and use correctly the various constructs that made the language most effective than it was to solve the generally non-time critical problems I was working on. Obviously others will have different experiences and hence viewpoints, I'm not saying mine is the only one. To my mind C++ has effectively evolved into a new language, so much so that someone coming to it from new is probably in a much better place than someone like me who started with assembly language and has moved through C, C++ etc over the years. I think it is past time really for the latest iteration of C++ to drop all the 'legacy/compatability' stuff and stride out as a new language without all the baggage.

                                      1 Reply Last reply
                                      0
                                      • S swampwiz

                                        This forum posting seems to say yes. So-called "modern C++" (basically C++11 and beyond) is really immensely more ple... | Hacker News[^]

                                        T Offline
                                        T Offline
                                        Thornik
                                        wrote on last edited by
                                        #19

                                        Why bother with that clumsy C++ at all?? People already invented "next C++" named "D". Wonderful language with a lot of features which C++ cannot dream of.

                                        1 Reply Last reply
                                        0
                                        • D Dean Roddey

                                          Modern C++ is very complex and the bulk of people who use it probably don't understand half of the details. It's vastly over-templated. It's not really possible to keep build times low when you have enormous amounts of templated code in a large code base because all that code is inlined. A lot of folks in the 'modern' camp seem to have convinced themselves that inheritance is evil, and will jump through fairly ridiculous hoops not to use it, using horrendously ugly stuff like the standard variant stuff and basically doing what OO was invented to avoid (lots of switch statements everywhere, and standard variant is just a particularly ugly switch statement.) A huge amount of effort was spent creating a seriously over-engineered container system, while leaving fundamental stuff not dealt with, and leaving C++ in a situation where even now you can't write even a modest practical application without third party libraries.

                                          Explorans limites defectum

                                          S Offline
                                          S Offline
                                          Steve Naidamast
                                          wrote on last edited by
                                          #20

                                          I tend to agree with you on your assessments, though I am not all that familiar with the C++ language in depth. many years ago when dinosaurs were still considered big pets, I met a senior C++ engineer and had a very nice discussion with him. He had been coding in C++ for over 25 years and he told that the majority of issues with C\C++ development come from the fact that the majority of developers using this language really did not understand the language in depth; hence the many issues with C++ applications. He went on to say that do quality C\C++ development you really have to spend a lot of time understanding how the internals work...

                                          Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                          D 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