Announcement

Collapse
No announcement yet.

GCC Developers Look At Transitioning Their Codebase To C++11

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Originally posted by tildearrow View Post
    Insignificant though...
    Code:
    phx::reply::post post << phx::reply::post::contents::hate_rationale(std::string("I dislike the namespacing syntax... (::)"));
    the good thing about namespacing syntax is that you don't always have to use it. you can skip it when you are inside same namespace or when called function is found by adl. or after using directive or using declaration, but that should be used with care

    Comment


    • #62
      Originally posted by pal666 View Post
      it's future tech because it was not ratified yet
      Nope, because it isn't available. C++ was a huge thing for 15 years before being ratified in c++98.

      Comment


      • #63
        Originally posted by pal666 View Post
        you are 5 years late
        To ensure it acquires broad compiler/platform support.

        (yes, I know compilers like GCC often implement these standards ahead of time but not every compiler does so)

        Comment


        • #64
          Originally posted by pal666 View Post
          c arrays decay to pointers. it's advisable to forbid constant size c arrays
          What if I really have to pass a pointer to some C function?
          (you can't do that with std::array (?))

          Comment


          • #65
            Originally posted by pal666 View Post
            all cool kids are already switched to kotlin
            ...as long as you can accept bloat.

            Simple Mobile Tools are written in Kotlin, and every application has around 4MB of bloat.

            Simple Thank You (their simplest app) is 4.4MB in size, when it should just be ~30KB. What a joke!

            Comment


            • #66
              Originally posted by coder View Post
              Cool. Thanks for letting us know.
              ...us? Do many people write under your account?

              Originally posted by coder View Post
              Well, you can mitigate that using namespace aliases, the using keyword, typedefs, etc.

              Furthermore, you can put your own symbols with private visibility in an anonymous namespace.
              I know but I would prefer not to do so.

              Comment


              • #67
                Originally posted by pal666 View Post
                as a c++ user my mind boggles at how you scheme programmers survived without static typing
                Static typing is way overhyped.

                Originally posted by pal666 View Post
                in c++ they are certainly not procedures. they are unnamed class objects with overloaded operator() (functors)
                Tomato, tomato. That is just an implementation detail.

                Edit: In fact, I recommend you look up what a functor is, so you can understand my point better. What is a class object with overloaded operator()? It's a function expression lol, aka, a callable object. You are just looking at it from the C++ perspective, but what you don't understand is that it is implemented this way due to the fact that C++ is a lot more primitive than other languages with runtime dynamism and the ability to instantiate objects at will instead of having to use classes. I almost said "newer" languages there, but I had to catch myself because Lisp has been around since like the 40s lol.

                Originally posted by pal666 View Post
                c++ had proposal with similar syntax, it was rejected due to technical issues. you see, c++ committee has to design sane language, unlike javascript. but maybe someone comes with improved proposal in fufure
                You know what's funny? I knew before I even hit Post Reply that mentioning JavaScript would trigger one of you.

                Originally posted by pal666 View Post
                all cool kids are already switched to kotlin
                For what? Android development? Clojure and Kotlin are not even targeting the same audiences.
                Last edited by cynical; 01 October 2019, 03:10 PM.

                Comment


                • #68
                  Originally posted by coder View Post

                  One of its saving graces. But, it's not hard to find flagrant overuse/abuse of lambdas, in Javascript. While AJAX code is immensely helped by them, it's not uncommon to see most of a source file written in lambdas.
                  Oh I know, too much of a good thing. They actually have gone to the point where sometimes I suggest naming procedures to improve readability lol.

                  Originally posted by coder View Post
                  I didn't say it wasn't good. However, from the beginning, it seems to veer straight into language laywering, before it really starts to pay off (IIRC). That could be off-putting for some, but it's definitely worth pushing through.

                  My recollection is that his earlier C++ books started with a much more gentle tone, offering advice you can use straight away.
                  Ah I see. I haven't read his earlier works so I can't compare. There are so many books on the language itself that I was relieved to find one that was a bit more opinionated. Not that I need to be told what to do, but I like to hear other people's opinions on the best practices and then decide whether or not I agree with them.

                  Comment


                  • #69
                    Originally posted by pal666 View Post
                    you are pretty wrong. msvc is the worst one. and it has improved recently, some years ago it was like separate language when every crossplatform codebase had to support non-standard prehistoric msvc
                    and for lulz msvc is still not fully c++98 (though they are getting close)
                    If you are talking about two phase lookup, they fixed that. MSVC was stupidly slow to adopt standards, but they started to catch up recently (thank goodness).
                    Either way, I was talking about C++ adoption of the company, not of their compiler.

                    Originally posted by pal666 View Post
                    that's enterprise. they sell it asap even if it still has rough edges
                    Are you sure of that? I recall that it was available for testing.

                    Originally posted by pal666 View Post
                    modules are jointly designed by all big 3 compiler devs
                    From memory, there were two distinct proposals, one from a Microsoft developer and one from a Google developer. They decided to make a new proposal based on both.
                    Again that's from memory so I might be mistaken on details, but I'm pretty sure it went like that.

                    Comment


                    • #70
                      Originally posted by pal666 View Post
                      c arrays decay to pointers. it's advisable to forbid constant size c arrays
                      Well, perhaps deprecated with std::array, but I wouldn't care one way or another, in my 30 years of C++ experience I have never seen any bugs caused by arrays decaying to pointers, arrays are rarely something you pass around with ownership, so how they decay if you did is irrelevant for me, though I guess std::array is technically superior

                      Originally posted by pal666
                      you are pretty wrong. msvc is the worst one. and it has improved recently, some years ago it was like separate language when every crossplatform codebase had to support non-standard prehistoric msvc
                      and for lulz msvc is still not fully c++98 (though they are getting close)
                      You are right about them improving recently (as in the last 2 years), wrong about the rest. VS2019 now has full C++17 support, and is the only compiler besides g++ to have that. Clang is still missing many of changes to the standard library, though they finished the core language changes rather early. The worst compiler these days is Apple clang which is the retarded step child of clang, Apple clang is even more behind than clang, and often has some extra bugs thrown in to spice things up for people doomed with having to support Apple crap.
                      Last edited by carewolf; 01 October 2019, 05:12 PM.

                      Comment

                      Working...
                      X