No announcement yet.

C++17 Is Near, A Look At The New Features

  • Filter
  • Time
  • Show
Clear All
new posts

  • #71
    Well... not to be argumentative or anything, but for vectors STL is not the only place I go. Depends what they're vectors of, and what I want them for. Likewise std::strings are nice, but QStrings are frequently nicer. And not that I'd stoop so low myself (unless I'm forced to by MPI), but coder could possibly lend an example (or two) where byte arrays were in fact very good design...


    • #72
      Originally posted by mmstick View Post
      It's very much a part of C++, and it's imported in C++ projects through the std namespace: `std::string` and `std::vector`.
      This i believe is changing in new C++ standards. But NOTHING is imported in C++. STL is just c++ code that is included. STL is as the name describes just a standard library that platforms/toolchains can have its own implementation of to do whatever optimization they like. Including using realloc if they wish.
      Originally posted by mmstick View Post
      If you want vectors in C++, the STL is where you go. Likewise, the same applies to strings.
      Not really. STL can be very inefficient and sometimes it would be better to turn to a different library. Which is one of the reasons for accelarated standard releases in the first place as the limitations caused STL implementations to be slow and make to many copies.
      Originally posted by mmstick View Post
      What you're referring to is not a `C++ String`. That is a byte/character array, basically a `C String`.
      They are the same. C++ is designed to be C compatible. STL string is something else.
      Originally posted by mmstick View Post
      An actual string is a structure that handles UTF-8/16 text and supports reallocation / shrinking / growing. Basically, an actual string type is in the form of `std::string`.
      Says who?
      Originally posted by mmstick View Post
      Reducing yourself to byte arrays for all your string handling is simply bad design. No one should allow you to code in their codebases.
      Nevertheless it is what a string/literal is in C++ and C and it will remain as such as long as there are string literals in the binary. Same for Rust or any language for that matter.

      Originally posted by mmstick View Post
      So you're admitting that you're twelve?


      • #73
        Originally posted by discordian View Post
        I don`t know about clion, but MSVC is good... aslong as you let it handle everything. As soon as you want to handle some Makefile or CMake based builds, it will cause significant trouble.
        Yeah, I am not too happy about the state of IDEs either, if you need some good crossplatform (other OS, or no OS) and hardware debugging support you will likely end up with eclipse, or something based on it.

        Someone should pay me to write one, using the LLVM / Clang Libs, I`d be interested in doing that =)
        CLion has full CMake support. It infers project structure details from CMake files and won't modify your CMake unless you want it to. CLion has a normal source debugger, I don't know what "hardware debugging support" is.

        Eclipse has slowly fallen out of favor over the past decade. JetBrains generally makes the best IDEs. Most Python teams prefer PyCharm, in the Java/Scala worlds IntelliJ is the most popular, in Ruby RubyMine is the most popular, for JavaScript including Node and HTML WebStorm, and for a database GUI, DataGrip is the best.

        I haven't done heavy C++ development in recent years, so I haven't used CLion, but that looks great from the outside.


        • #74
          Seems like there are a lot of true believers, in this thread.

          Originally posted by cj.wijtmans View Post
          You should seriously be banned for your bs.
          C'mon, guys. Experience has taught me that one might be less right, and the other person less wrong than you might think. And insults really undermine your case. People with strong arguments generally have no use for them, so they make you look weak.

          There's not always a singular, correct approach to solve every problem. Languages are just tools for solving problems. They each have strengths and weaknesses. By learning a new language, you might discover a different way of approaching certain problems, and that will probably make you a better programmer. So, try and keep an open mind.

          Given that we're all on this board, and in this thread, we certainly share many common interests and views. Internecine violence is some of the most tragic, if not the worst. Try to be respectful, at least.


          • #75
            Originally posted by discordian View Post
            Not extensible enough (hardware debugging?)
            ... Did you look at the manual ? It handles hardware debugging without problems :