EDG C++ front-end goes public

(edgcpp.org)

33 points | by iandinwoodie 39 minutes ago

5 comments

  • vintagedave 15 minutes ago
    Wow. This is big news for C++.

    For background -- and I am not an expert here -- their C++ frontend is widely known. I first heard of it because Visual C++'s Intellisense uses it, which was notable because VC does not use the msvc frontend for its own completion. I understand it's been either used or evaluated for other frontends in the past too. I worked as PM for one C++ product, and was fortunate to be able to learn a lot from our engineers; we didn't use it, but they thought highly of EDG.

    It has a very strong reputation for being correct. And as such, I think open sourcing it will be a very beneficial thing for the C++ community.

  • suid 16 minutes ago
    Ooh, fond (and some not so fond) memories of when Silicon Graphics' (MIPS) C and C++ compilers were based on EDG's frontend, with a custom ucode-generating backend, and integrated into CASEVision. Early 1990s.

    EDG was just 3 guys back then.

  • OneDeuxTriSeiGo 21 minutes ago
    Announcement: https://edgcpp.org/#transition

    The source code itself: https://github.com/edgcpp/compiler

    Documentation: https://edgcpp.org/doc/

    And for those curious the license SPDX is: Apache-2.0 WITH LLVM-exception

    i.e.

    - https://spdx.org/licenses/Apache-2.0.html

    - https://spdx.org/licenses/LLVM-exception.html

  • cyberax 8 minutes ago
    It has an interesting code style, the comments go _after_ the function definition but before the opening bracket.

    It looks weird, but it actually makes sense! The flow is more natural - first the function definition, and then the explanation of what it does. It also avoids repeating the function name.

    • zerr 0 minutes ago
      This is common in Lisps.
    • mhh__ 4 minutes ago
      This is also where conditions go in languages with contracts, I like it
  • my-next-account 27 minutes ago
    What is this?
    • dgrunwald 21 minutes ago
      It's one of the 4 big remaining C++ compiler frontends: gcc, clang, MSVC, EDG. Most other C++ compilers are based on either EDG or clang. (e.g. the Intel C++ compiler used to be based on the EDG frontend, though modern versions are based on clang instead)

      The "frontend" is the part of the compiler that understands the input language: lexer, parser, template instantiation, constexpr evaluation, ... The EDG frontend produces an intermediate representation (IL) that is then used by the different compiler vendors to generate machine code. Or do code analysis.

      EDG can also be used as a C++-to-C compiler.

    • OneDeuxTriSeiGo 25 minutes ago
      https://en.wikipedia.org/wiki/Edison_Design_Group

      TLDR EDG C++ is a compiler frontend developed by EDG since the 80s which has been used under the hood for a whole bunch of commercial C and C++ compilers, static analyzers, linters, and IDE code completion tools.

      Odds are if you are familiar with a closed source tool in one of those categories above, there's a decent chance it uses EDG's frontend somewhere in it under the hood.