Subj : Re: Preprocessor Languages To : comp.programming From : britt.snodgrass Date : Thu Jul 21 2005 04:29 pm akarl wrote: > Mike wrote: > > On 2005-04-03, Matt Gregory wrote: > > > >>I was just sitting here wondering why there aren't any popular languages > >>that are compiled to C. I know there's Perl and the GNU Lisp compiler, > >>but last I knew compiling to C was pretty much a one-way operation, > >>since the generated code wasn't manageable. I'm thinking about some > >>way you could work with both languages simultaneously. > >> > >>How well would this work?: a language that had an interactive > >>environment so you could do bottom-up development, but compiling turns > >>it into sane, well commented C code, so you could continue working on it > >>in C if you needed extra performance or flexibility or whatever. The > >>language could have an escape so you could write inline C code, like the > >>inline assembly escape in non-standard C. That way you could keep > >>working with the high level language if you only wanted select parts > >>hand written in C. The interactive environment wouldn't necessarily > >>need to understand C, I don't think. It wouldn't be absolutely > >>necessary, anyway. The compiler would amount to a fancy C preprocessor. > >> > >>What attempts have been made to do this, and what were the results? > >> > >>Matt Gregory > > > > > > There are both Lisp and Scheme systems that compile to C. Java also. > > ...and Eiffel and Oberon... .... and Ada 95 (see http://www.sofcheck.com/products/adamagic.html#adamagic) .