|
|
|
|
|
by bunderbunder
22 days ago
|
|
So yeah, half of Python might still be Turing-complete, but it wouldn’t really be Python for any practical purpose. Just like how a device that can’t multiply or divide is not a 4-function calculator; it’s more like an adding machine. Many of which did multiply by serial addition. |
|
'
def hello_world():
'Is that not python? Yet it uses a subset of python?
That program can be run by either a python runtime, or a python subset runtime.
Now if you were to run a python subset program, like a hello world, you would get:
'
def hello_world():
'Whoah, it's the same thing.
Turns out every program you write with a subset of a language, is valid for the super language.
Subjectively also, if the subset is big enough, it feels like that language, if it uses 'def' for functions, that's python. 'I know it when I see it' kinda deal.
I think the confusion comes from the mathematical folk reading "subset of X is X", and implying that "subset of X=X". But this is natural language, not mathematical language, when I say that "dog is mammal", I'm not saying that "dog = mammal" I'm saying that "dog ∈ mammal", and "subset of python ∈ python"