← Back to context

Comment by SPBS

13 hours ago

It’s true, the title should have said “Python-like”

I like python subset. However, many don't see it that way.

  • It's not a subset of python.

    For instance this program works in this interpreter, but not in python:

        fxx i in rxxxx(10):
            pxxxx(i)

  • You're right, mathematically it's undeniably true. However...

    One could imagine an even smaller subset interpreter. It's an interpreter for a subset of Python, consisting only of the programs that print "Hello World". Since it doesn't do any error checking, for all other programs the output is undefined. Implementing it is very simple: Just ignore the input file, and print "Hello World". As a bonus, it's an interpreter for the subset of "Hello World" programs in all other programming languages too!

    </tongue-in-cheek>