Results 1 to 10 of 19

Thread: C Language Modules For LLVM Still Being Tackled

Hybrid View

  1. #1
    Join Date
    Jan 2007
    Posts
    14,643

    Default C Language Modules For LLVM Still Being Tackled

    Phoronix: C Language Modules For LLVM Still Being Tackled

    Last year at the LLVM developers' meeting it was proposed by an Apple engineer the concept of "modules" for C code in LLVM/Clang to replace the common development approach for C/C++ languages of including header files and passing the library to the linker. LLVM modules seek to take a different approach...

    http://www.phoronix.com/vr.php?view=MTMzMjQ

  2. #2
    Join Date
    Nov 2010
    Posts
    69

    Default

    Might be cool idea. This should be proposed as standard and discussed by Stroustrup and rest of the standard team. Because it doesn't makes any sense to implement such things outside the standards.

  3. #3
    Join Date
    May 2012
    Location
    Sunshine State
    Posts
    303

    Default

    C and C++ really need this. The whole .h files and cross-file-forward-referencing thing are probably the biggest thing which makes C/C++ feel "dated" compared to languages with proper "module" systems (Java, D, C#, etc). Hopefully it can be done as a standard, or at least added to GCC as well.

  4. #4
    Join Date
    Jan 2013
    Posts
    60

    Default

    Awesome, about time. Now let us hope this gets worked into the standard.

  5. #5
    Join Date
    Oct 2012
    Location
    Washington State
    Posts
    441

    Default

    Worked into standards? Sure.

    In the meantime, the 21st century's second decade will end before that happens. Glad to see LLVM/Clang is designing and testing now.

  6. #6
    Join Date
    Mar 2013
    Posts
    16

    Default

    Quote Originally Posted by j2723 View Post
    Awesome, about time. Now let us hope this gets worked into the standard.
    No, let's hope this get implemented and then standardized later.

    Back in the old days Turbo Pasal compiled with similar lines/min as Borland C. However as there is *much* less to compile when there are no include files building a project in Pascal was much faster then with C. The situation only worsened with C++ as there much more code in the header files. Borland in the time tried to speed C compiling up while maintaining compatibility by introducing compiled header, which was just a memory dump of the data structures after compiling the headers. This precompiled header file could only could only be reused between C modules if the included file where exactly identical. This of course didn't work well.

    It really is time to introduce something similar like the old Trubo Pascal:
    Unit xxx; #import the interface of another module
    Interface; #define function prtotypes of functions that are exported
    Implementation; # function bodies follow here

  7. #7
    Join Date
    Sep 2008
    Posts
    121

    Default

    Stroustrup and friends have surely looked at modules, and possibly considered it for the next standard. Probably helps if Clang developers do this first though.
    Also, for template heavy libraries, like boost can be, the gains aren't really that great.

    Seems like Clang would make use it this in a very smart way, which is nice to hear.
    The "futuristic" version doesn't really seem feasible though, especially for C++.

  8. #8
    Join Date
    May 2012
    Location
    Colombia
    Posts
    19

    Default

    Quote Originally Posted by michal View Post
    Might be cool idea. This should be proposed as standard and discussed by Stroustrup and rest of the standard team. Because it doesn't makes any sense to implement such things outside the standards.
    What has Stroustrup to do with C?

  9. #9
    Join Date
    Jun 2011
    Posts
    880

    Default

    Quote Originally Posted by Desiderantes View Post
    What has Stroustrup to do with C?
    CLang covers more than C, it covers C++ and Objective-C(++) as well, and being accepted by the C++ standards committee would probably also result in it being accepted by the C standard committee as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •