> C interfacing works today and has been very thoroughly tested. cppclass
only works, for very basic things, since 2 days ago or so. Unless
someone enjoys<br>> debugging a new code generator and a new external
language interfacing paradigm at the same time, that does not sound
like a very good idea to me.<br>Absolutely you have a point here. But AFAIK "C++ linking" is part of FPC roadmap (not part of LLVM discussion at all). And LLVM C++ support is at least currently more feature complete. Finish porting LLVM to C or supporting C++. The question is what is more maintainable in the end?<br>
<br>> It doesn't weigh up to over 12 years of experience developing FPC and
knowing Object Pascal (to the extent that it's used in the compiler)
inside out. <br>> My C++ and STL knowledge is basic at best. If someone else
wants to create an FPC frontend for LLVM in C++, they are of course
free to do so.<br>Exactly, I prefer frontend in FPC too, reusing lexer, parser, AST. Using LLVM only as a compiled library for codegen (with C or C++ bindings).<br><br>> Then you're no longer talking about porting FPC/Delphi, but about
creating a new language inspired by FPC/Delphi. There's nothing wrong
with that, <br>> but given the amount of bug reports that we already get
today when implementation details are slightly different to Delphi's,
I'm not sure how much<br>> success you'd have with the existing Delphi/FPC
users.<br>Actually I am. I was talking about C++ ABI ( not API, that was typo :) ). Having class VMT,
exceptions the same as C++ could be a huge interop benefit :) And you get the C++ linking for free. Currently LLVM is still quite evolving. And it would be easier to start with code based on CLang (with some FPC features missing) and later add more FPC features when other projects "invent" features that C++ does not have (VMKit & Reflection,RTTI). It should be the faster way to implement LLVM frontend. With currently implemented clang we could already support 90% of FPC language.<br>
<br>> You have to offer a basic "amount" of either compatibility or
incredible advantages before anyone will want to use your compiler. As
soon as the hurdle gets too <br>> high, many people will simply not consider
it worth it and stick to what they know. The threshold is different for
different people, but it's not that high in general.<br>True. And supporting LLVM does indeed offer a lot of incredible advantages (well not all of them right away).<br><br>> FPC's backend is already quite plugable (otherwise we would not be able
to have 6 codegenerators maintained by 3-4 people).<br>> It's just at a
lower level currently than what something like LLVM requires.<br>That's what I meant. Abstraction on higher level.<br>
<br>> <a href="http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf" target="_blank">http://www.linux-kongress.org/2009/slides/compiler_survey_felix_von_leitner.pdf</a><br>Btw how does FPC or Delphi fare in comparison to LLVM, GCC, VC++?<br>
<br>Matej Spiller-Muys<br><br>