EDG C++ front-end goes public
edgcpp.org
edgcpp.org
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.
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.
One of EDG developers prototyped his idea, and brought it to WG21 when it seemed reflection as originally thought for C++17 was never happening.
Looking back at that code definitely brings back memories. As a consumer of both frontends, I will say I much preferred working with Clang's. Both needed extra work on top to support everything we needed. Maybe I'm just not as acquainted with C as I would like to be. It's cool to look at this again, though.
EDG was just 3 guys back then.
Where other languages might use inheritance, EDG still uses the C-style `union { ... } variant;`.
On a related note, compiling EDG is extremely fast: on my machine, the EDG frontend compiles in <10s; whereas clang takes >10min (caution unfair comparison: clang includes much more than just a frontend).
EDIT: But in this case it seems something significant is being released, it would be better with less writing and more human if possible.
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.
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.
Nice to see this still exists!
After all, this is how it all started back in the days of - what was it called again ? - yeah, cfront
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.
void func(var1, var2) int var1, char* var2. { ... }
perhaps some legacy from that? Probably not, but just first thing that popped into my head since it feels similar :shrug: