Re: Re: software design clarification
Nathaniel Smith <[email protected]> Tue, 8 May 2007 02:07:01 -0700
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
On Fri, May 04, 2007 at 07:39:56AM -0400, Stefan Seefeld wrote: > Yes, Elsa is definitely on my radar. I have been looking at the code, as > well as the docs, for a while, and even had some discussion with its main > author. > > What holds me back from hooking that up as a C++ parser is principaly > two reasons: > > * It doesn't have all the features Synopsis supports, and thus, even though > it is more complete, it would cut on the functionality we can provide. Hmm, what is it missing, out of curiosity? I know it has full tracking of the relation between source and AST, and my impression is the type system is complete-ish... I guess it probably doesn't parse comments but that's hardly a showstopper... > * The code is quite messy. While I could treat it as a black box (as long > as it works, at least), I believe part of the appeal to work on Synopsis > is to make all the logic of a C++ compiler frontend as transparent as possible, > i.e. it is also a very educative experience (for me at least, but hopefully > also to others who look at the code). Right. From the pace of development I see (though perhaps I am just missing what's really happening), it seems like in practice this means you are forced to choose between creating a clean and beautiful C++ front-end to reward contemplation, and creating a tool that helps people achieve cool stuff. I actually like contemplation, so I can respect your decision :-). But one of the things I've learned in the past few years (partly from Fresco, as it happens...) is Strategy Matters. IME the way to optimize for long-term fast, sustainable, and enjoyable growth is, paradoxically, to aggressively optimize in the short term for dirty-yet-practical results (which bring in other developers, and which mean you get experience with an end-to-end working framework so you can actually refactor properly, and which mean hacking is more fun and motivating because you get to play with cool end-products and working code and interesting patch submissions, etc. etc.). I only bring this up, of course, because I think Synopsis is very cool and greedily want to see it succeed wildly, so I can play with it too. But good luck to you whatever you do :-). > Yet another alternative that hasn't come up yet is to try to enhance GCC > itself, i.e. add all the hooks there to make it useable in a context like > Synopsis (that's the path choosen by the gccxml folks). While there are > a couple of people who try to convince me that this is a better way to spend > my spare time, I think the reasoning is principally the same as for Elsa > (see above). That sounds even messier to me, and much harder to keep in sync with. (Though the way Synopsis works, wouldn't it be very simple to have a front-end that eats gccxml and produces the same Synopsis AST as a real front-end would? If such a processor could be implemented quickly, that'd be very handy for bootstrapping the rest of Synopsis's Cool Stuff and you could just drop in whatever front-end you end up using, when it's ready?) -- Nathaniel -- Eternity is very long, especially towards the end. -- Woody Allen