4 ms·
The idea behind this series of posts is to see how much of python, concretely, is syntactic sugar and how much is necessary. How much could you do with e.g. doi
by faho 4y ago
The idea behind this series of posts is to see how much of python, concretely, is syntactic sugar and how much is necessary. How much could you do with e.g. doing macro transformation on top of a minimal core?
The last post before this was titled: "MVPy: Minimum Viable Python".
So, since python doesn't have goto, you can't replace while with an if with two gotos (without adding a goto to the language).
You can replace an `if` with a while tho, easily.
- moffkalast 4y agoTbf python isn't exactly a language that's high in sugar to start with, it doesn't even have switch statements. Not sure why you'd want to take away even more until there's nothing usable left. People have the weirdest hobbies hah
- milliams 4y agoNo, but it has the `match` statement which is even better: https://docs.python.org/3/whatsnew/3.10.html#pep-634-structural-pattern-matching https://docs.python.org/3/whatsnew/3.10.html#pep-634-structu...
- moffkalast 4y agoI wouldn't exactly call something only available in 3.10 as something python "has". Most of us haven't moved past like 3.8 at best, some still using 2.7 for legacy stuff even.
- rgmerk 4y agoWaiting for the solution that involves transforming Python code into an encoded Turing machine and implements a minimal UTM in some tiny subset of Python.