Announcement

Collapse
No announcement yet.

Modula-2 Language Frontend Merged Into GCC 13

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

  • #31
    Originally posted by coder View Post
    ...because C and C++ had header files and libraries, which worked almost well enough. The activation energy is higher for introducing a second solution to a problem that you've already solved in a different way. But, I guess some people never miss a chance to throw shade at C++.​
    Include files may have been a reasonable idea when C was created in the '70s but they have been terrible by modern standards of languages. It is not a slight at C++ that it kept with a bad feature from C for so long as the only method. Includes are just literal macro expansion of entire files.
    Performance issues requiring weird precompiled headers, bad separation of interfaces and implementation, code in headers I believe are real issues.

    Are #ifdef __MYINCLUDE_HPP__ guards still are a thing? People needs to manually avoid repeating includes.

    Comment


    • #32
      Originally posted by coder View Post
      ...because C and C++ had header files and libraries, which worked almost well enough. The activation energy is higher for introducing a second solution to a problem that you've already solved in a different way. But, I guess some people never miss a chance to throw shade at C++.
      By doing this, if your class implementation doesn’t change then it won’t need to be recompiled. If anyone wants more information, http://www.math.uaa.alaska.edu/~afkj...ompilation.pdf can be seen.

      Comment


      • #33
        Originally posted by darkonix View Post
        Include files may have been a reasonable idea when C was created in the '70s but they have been terrible by modern standards of languages. It is not a slight at C++ that it kept with a bad feature from C for so long as the only method. Includes are just literal macro expansion of entire files.
        Performance issues requiring weird precompiled headers, bad separation of interfaces and implementation, code in headers I believe are real issues.

        Are #ifdef __MYINCLUDE_HPP__ guards still are a thing? People needs to manually avoid repeating includes.
        Header files had a lot of inertia, with lots of 3rd party tools support, and provided an oft-used bridge between C and C++ (both directions), which shouldn't be understated.

        There were practical problems to be worked out with modules. Given that header files + libraries was a workable solution, I can understand why modules weren't such an urgent priority for the C++ standards committee.

        Bringing it up here is just whataboutism. It really has nothing to do with the thread, but I guess some are either looking for an excuse to trash C++ or would rather we not focus on Modula-2, for whatever reason.

        Comment


        • #34
          Originally posted by coder View Post
          Header files had a lot of inertia, with lots of 3rd party tools support, and provided an oft-used bridge between C and C++ (both directions), which shouldn't be understated.

          There were practical problems to be worked out with modules. Given that header files + libraries was a workable solution, I can understand why modules weren't such an urgent priority for the C++ standards committee.

          Bringing it up here is just whataboutism. It really has nothing to do with the thread, but I guess some are either looking for an excuse to trash C++ or would rather we not focus on Modula-2, for whatever reason.
          You are right, I didn't look to what discussion I was answering. Sorry about that. Your points are well taken and I agree. Still I don't like include files

          Comment

          Working...
          X