From: | "Tony" <nospam@myisp.net> |
Newsgroups: | comp.compilers |
Date: | Mon, 24 Jan 2011 06:37:15 -0600 |
Organization: | TeraNews.com |
References: | 11-01-082 11-01-088 11-01-092 11-01-102 |
Keywords: | C, translator |
Posted-Date: | 26 Jan 2011 12:17:08 EST |
chris dollin wrote:
> "Tony" <nospam@myisp.net> said:
>
>> I am surprised (kinda) to see how many people consider C a suitable
>> compile-to language when it really is only good for C-derivatives.
>> C++ is one of those, so cfront was adequate, for awhile. For
>> languages that depart from C-likeness, it is not suitable at all.
>
> The language Pepper I designed as a Pop11-derivative can be thought of
> as "Lisp with an open stack" and I had a reasonable Pepper-to-C
> implementation. "Not suitable at all" seems a bit of a stretch.
Well, do tell what Pepper I has in common with C then. What compromises
were made to the design because of the choice of implementation?
I shouldn't have said "C-likeness", but rather "some C-likeness".
Obviously one can make a drastic departure from C and still compile to
C, but somewhere there is a "line" or "lines" where the implementation
affects the design. I pondered that the type system is one of those
lines of demarcation. Also, it may not be that it is not doable in C,
but rather that it is not practical, not elegant, etc.
> It helps that Pepper has no non-local gotos or an exception mechanism.
> The design for full lexical scoping was not implemented but the
> primitive it would have used -- partial application, ie a kind of
> currying -- was; not implementing was mere laziness on my part.
>
> So likely it all depends on what value one places on different
> implementation characteristics.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.