Undefined behaviour in C [was Re: The Cost of Dynamism]

Rustom Mody rustompmody at gmail.com
Sun Mar 27 03:13:24 EDT 2016


On Sunday, March 27, 2016 at 12:05:01 PM UTC+5:30, Paul Rubin wrote:
> Rustom Mody writes:
> > eg haskell (ghc) is written in ghc
> > Where did the first bootstrap start from?
> 
> The very earliest Haskell implementation was written in Lisp.

Ummm So you found a little chink in my argument -- Ok :-)
Yeah I remember that Paul Hudak of Yale (now deceased) was working on Haskell
in Yale-scheme (T). I did not know it ever materialized.

However in pragmatic terms I dont think the argument changes; viz.
If you take any technology today (and it may not be remotely connected to
computers eg the chip that controls the car, the credit card's ATM network
layer etc etc, you will invariably find C.
All that you need to do is to work out the transitive-closure of the
implemented-in/interpreted-by relation.
So a C program uses C at 0 removes
A CPython program uses C at at 1
A PyPy program at 2 (or 3 or 4 not likely more than that).

On a funny note:
I was teaching APL and one of the students came and asked me:
Did C exist in 1960?
No Why?
Well You said APL was implemented in 1960 and APL is implemented in C

Nothing to match the power of syllogism :-)

So yes one can in *principle* have a completely C-less world
Just like one can in principle compute the square-root of Graham's number

Likewise a cost of a billion dollars de-C-ification is probably a gross underestimate:
See https://en.wikipedia.org/wiki/Rock's_law



More information about the Python-list mailing list