<div class="gmail_quote">On 14 April 2012 16:51, deadalnix <span dir="ltr"><<a href="mailto:deadalnix@gmail.com">deadalnix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Le 14/04/2012 12:35, Manu a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On 13 April 2012 18:25, Jakob Ovrum <<a href="mailto:jakobovrum@gmail.com" target="_blank">jakobovrum@gmail.com</a><br></div><div><div class="h5">
<mailto:<a href="mailto:jakobovrum@gmail.com" target="_blank">jakobovrum@gmail.com</a>>> wrote:<br>
<br>
    On Friday, 13 April 2012 at 13:08:51 UTC, deadalnix wrote:<br>
<br>
        SDC have a lot of theses, and I proposed a similar stuff for its<br>
        evolution. I think it is easier for SDC than it is for dmd<br>
        considering the codebase of both.<br>
<br>
<br>
    I think we've got the lexer and parser completely separate from<br>
    most of the rest of the codebase (like the codegen), due to<br>
    repeated requests from people who wanted to use these parts for<br>
    IDEs and other tools.<br>
<br>
    I've yet to see anyone actually go through with using it though,<br>
    possibly because there is no documentation for a lot of it.<br>
    Documenting these parts fully into something of a public API and<br>
    then putting it online is definitely on the todo list. Perhaps<br>
    there would be more motivation to do this rather than work on<br>
    something else if someone actually tried using SDC in their<br>
    project instead of just talking about it, so it's kind of a<br>
    catch-22.<br>
<br>
    That said, the parser is currently evolving alongside the<br>
    codegen. When we want to start implementing new parts of the<br>
    language, we iteratively add it to the parser, hence it's not<br>
    complete. It's very easy to work with though and it's mostly a<br>
    menial task (although it's kind of fun to produce beautiful<br>
    parser errors :P).<br>
<br>
    Anyway, for anyone interested, you can find us on Github and<br>
    #d.sdc on FreeNode.<br>
<br>
<br></div></div><div class="im">
Just out of curiosity, why would anyone write a code gen these days?<br>
With projects like LLVM, which can perform great codegen to basically<br>
any architecture, you'd be crazy not to use that...<br>
Surely 90% of the value of writing your own D compiler would be the<br>
unique front end, which may have different design principles (like use<br>
as a lib, usable on tools and stuff as discussed here) ?<br>
<br>
I'm sorry to say, if you write your own codegen, I would never use your<br>
compiler. If you use LLVM in the back end, I'll definitely give it a<br>
look, then merit will depend entirely on the front end (speed,<br>
flexibility, quality of error messages, runtime error detection, etc).<br>
I know it's a fun exercise to write a codegen, so from an educational<br>
perspective, sure, it's valuable to you as a programmer, but I don't<br>
think it helps your project at all.<br>
</div></blockquote>
<br>
Codegen is done by LLVM in SDC, but you still need some codegen glue.<br>
</blockquote></div><br><div>Ah okay, cool. NM me then :P</div>