neonumeric - C++ arbitrary precision arithmetic library

Mirko mirkok.lists at googlemail.com
Sat Mar 6 17:41:10 EST 2021


Am 06.03.2021 um 22:24 schrieb Ben Bacarisse:
> Mr Flibble <flibble at i42.REMOVETHISBIT.co.uk> writes:
> 
>>> Someone who says that he is capable of writing a compiler that
>>> translates every language has megalomania. No one can do this.
>>
>> Just because you can't make one it doesn't follow that nobody else
>> can.
> 
> True, but lots of very knowledgeable people have tried and failed.

I even wonder why they have tried. Writing a universal
compiler/interpreter sounds logically impossible to me, Here's a
simple Python expression:

>>> 3+3*5
18

And here's the same expression in (GNU) Smalltalk:

st> 3+3*5
30


How would such a universal compiler know which evaluation strategy
to follow, if not by writing a parser end evaluator for every
supported language? And if it's hard for this simple problem, how
about more complex cases.



More information about the Python-list mailing list