Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Creator: Completion no longer adds closing semicolon
Forum Updated to NodeBB v4.3 + New Features

Creator: Completion no longer adds closing semicolon

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
29 Posts 9 Posters 7.7k Views 5 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.
  • JonBJ JonB

    @kshegunov

    OK, this is why I like C & C# but not C++ ! I'll stop trying to think of where C++ struct might differ from class, since you're pretty clear & adamant that they don't :) Thanks.

    A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #16

    @JonB said in Creator: Completion no longer adds closing semicolon:

    @kshegunov

    OK, this is why I like C & C# but not C++ ! I'll stop trying to think of where C++ struct might differ from class, since you're pretty clear & adamant that they don't :) Thanks.

    C++ makes perfect sense, if you know it's history. Off the top of my head, I would say that struct came from pure C. When they designed C++, they needed a new construct for 'class', but decided to model it as closely as possible to an already existing construct, 'struct'. They decided that making everything public by default was too dangerous for 'class', but for compatibility reasons, they could not change that behavior for 'struct'.

    Today, you can use 'struct' and 'class' to convey different intentions. See http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-struct

    jsulmJ 1 Reply Last reply
    0
    • A Asperamanca

      @JonB said in Creator: Completion no longer adds closing semicolon:

      @kshegunov

      OK, this is why I like C & C# but not C++ ! I'll stop trying to think of where C++ struct might differ from class, since you're pretty clear & adamant that they don't :) Thanks.

      C++ makes perfect sense, if you know it's history. Off the top of my head, I would say that struct came from pure C. When they designed C++, they needed a new construct for 'class', but decided to model it as closely as possible to an already existing construct, 'struct'. They decided that making everything public by default was too dangerous for 'class', but for compatibility reasons, they could not change that behavior for 'struct'.

      Today, you can use 'struct' and 'class' to convey different intentions. See http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-struct

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #17

      @Asperamanca I think struct is still part of C++ because C should be a subset of C++ (more or less)

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Asperamanca I think struct is still part of C++ because C should be a subset of C++ (more or less)

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #18

        @jsulm said in Creator: Completion no longer adds closing semicolon:

        @Asperamanca I think struct is still part of C++ because C should be a subset of C++ (more or less)

        I had no intention of saying "struct is not part of C++", because of course it is.

        jsulmJ 1 Reply Last reply
        0
        • A Asperamanca

          @jsulm said in Creator: Completion no longer adds closing semicolon:

          @Asperamanca I think struct is still part of C++ because C should be a subset of C++ (more or less)

          I had no intention of saying "struct is not part of C++", because of course it is.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #19

          @Asperamanca You misunderstood me: I think struct could be removed from C++ as it is redundant (class is same thing), but then C wouldn't be subset of C++ anymore.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Asperamanca You misunderstood me: I think struct could be removed from C++ as it is redundant (class is same thing), but then C wouldn't be subset of C++ anymore.

            A Offline
            A Offline
            Asperamanca
            wrote on last edited by
            #20

            @jsulm
            Compatibility to legacy code is one of the strengths of C++. I for one would not want to go digging in old but reliably working code, just because a new version of the language stopped supporting certain constructs.

            When MS did that moving from VB6 to VB.NET, we dropped VB and since use C++ instead.

            jsulmJ 1 Reply Last reply
            0
            • A Asperamanca

              @jsulm
              Compatibility to legacy code is one of the strengths of C++. I for one would not want to go digging in old but reliably working code, just because a new version of the language stopped supporting certain constructs.

              When MS did that moving from VB6 to VB.NET, we dropped VB and since use C++ instead.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #21

              @Asperamanca I didn't suggest to do it, just mentioned why (probably) C++ still has struct even if it has class.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              JonBJ 1 Reply Last reply
              0
              • jsulmJ jsulm

                @Asperamanca I didn't suggest to do it, just mentioned why (probably) C++ still has struct even if it has class.

                JonBJ Online
                JonBJ Online
                JonB
                wrote on last edited by JonB
                #22

                @jsulm
                C# has struct as well as class, even though it has no pretence of backward C compatibility!

                And since we can't get C compilers any more, only C++ ones, thank goodness we can still get old-fashioned C code through them, without C++ bloatware ;-)

                sierdzioS 1 Reply Last reply
                0
                • JonBJ JonB

                  @jsulm
                  C# has struct as well as class, even though it has no pretence of backward C compatibility!

                  And since we can't get C compilers any more, only C++ ones, thank goodness we can still get old-fashioned C code through them, without C++ bloatware ;-)

                  sierdzioS Offline
                  sierdzioS Offline
                  sierdzio
                  Moderators
                  wrote on last edited by
                  #23

                  @JonB said in Creator: Completion no longer adds closing semicolon:

                  thank goodness we can still get old-fashioned C code through them,

                  ... what? You make it sound like C compilers from clang, GCC etc. were now a byproduct of C++, kept only for compatibility. That's simply not the case. There's a ton of living C code out there which requires proper C compilers (C standard and C++ standard are not compatible) to compile and run. Linux kernel, to mention one example.

                  We're slowly drifting more and more off-topic in this conversation :-) Still, it's interesting.

                  I always thought that the semicolon after class is a dumb leftover, but it has been rightly pointed out that the old syntax is still supported, and that means the semicolon has to be there (otherwise the code would be ambiguous), it can't be removed. I'm happy to have read your arguments, guys, they made me think about it more :)

                  (Z(:^

                  JonBJ 1 Reply Last reply
                  0
                  • sierdzioS sierdzio

                    @JonB said in Creator: Completion no longer adds closing semicolon:

                    thank goodness we can still get old-fashioned C code through them,

                    ... what? You make it sound like C compilers from clang, GCC etc. were now a byproduct of C++, kept only for compatibility. That's simply not the case. There's a ton of living C code out there which requires proper C compilers (C standard and C++ standard are not compatible) to compile and run. Linux kernel, to mention one example.

                    We're slowly drifting more and more off-topic in this conversation :-) Still, it's interesting.

                    I always thought that the semicolon after class is a dumb leftover, but it has been rightly pointed out that the old syntax is still supported, and that means the semicolon has to be there (otherwise the code would be ambiguous), it can't be removed. I'm happy to have read your arguments, guys, they made me think about it more :)

                    JonBJ Online
                    JonBJ Online
                    JonB
                    wrote on last edited by
                    #24

                    @sierdzio

                    https://en.wikipedia.org/wiki/GNU_Compiler_Collection:

                    In August 2012, the GCC steering committee announced that GCC now uses C++ as its implementation language.[30] This means that to build GCC from sources, a C++ compiler is required that understands ISO/IEC C++03 standard.

                    You need a C++ compiler just to produce a C compiler now! It's so sad... :(

                    jsulmJ 1 Reply Last reply
                    0
                    • aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #25

                      For reference, the report is here: https://bugreports.qt.io/browse/QTCREATORBUG-19726

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      2
                      • JonBJ JonB

                        @sierdzio

                        https://en.wikipedia.org/wiki/GNU_Compiler_Collection:

                        In August 2012, the GCC steering committee announced that GCC now uses C++ as its implementation language.[30] This means that to build GCC from sources, a C++ compiler is required that understands ISO/IEC C++03 standard.

                        You need a C++ compiler just to produce a C compiler now! It's so sad... :(

                        jsulmJ Offline
                        jsulmJ Offline
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #26

                        @JonB Apparently even GCC developers do not want to use C
                        :-)
                        Next, Linux kernel developers will switch to C++ and use templates! :-)

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        mrjjM 1 Reply Last reply
                        0
                        • jsulmJ jsulm

                          @JonB Apparently even GCC developers do not want to use C
                          :-)
                          Next, Linux kernel developers will switch to C++ and use templates! :-)

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #27

                          @jsulm
                          Naah as Linus would rather commit harakiri than use c++.

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #28

                            Linus subsurface fork says the contrary ;-)

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            mrjjM 1 Reply Last reply
                            1
                            • SGaistS SGaist

                              Linus subsurface fork says the contrary ;-)

                              mrjjM Offline
                              mrjjM Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on last edited by
                              #29

                              @SGaist
                              haha well after the mega rant towards c++ , he might have changed his mind later.

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved