From comp.lang.scheme [Re: C to Scheme]
Scott L. Burson
gyro@zeta-soft.com
Fri, 30 May 1997 22:25:11 -0700 (PDT)
From: Jordan Henderson <jordan@Starbase.NeoSoft.COM>
Date: Fri, 30 May 1997 22:16:42 -0500 (CDT)
Newsgroups: comp.lang.scheme
Dave Hanson seems to indicate that a first pass is trivial, a few hours
work for him. Admittedly, it's probably not industrial strength and it's
missing at least one necessary C feature. How difficult would it be to
get full ANSI C? The run-time libraries would take a little while to get
them good enough to port real world software, but my first guess estimate
is that someone could do a fully reliable, complete ANSI C->Scheme in
6 months in their spare time.
I think this is a little optimistic. ZETA-C, my C implementation for Lisp
Machines, took closer to 2 years, full time. Granted, some of that was spent
on performance, and on features that go a little outside the normal definition
of a C implementation (like a C mode for Zmacs and incremental compilation),
but still, I can tell you it's more than 6 months' work.
I presume Dave Hanson was starting not from original C source but from a list
structure representation with C semantics. That indeed is not very hard. (He
also said he skipped structures, which are nontrivial to implement
compatibly.) Add a parser with ANSI-compatible preprocessor, etc. etc. and
the time starts to add up.
-- Scott