10 ms·
What pain point of Python as an education language is Pyret trying to address? Union type might be vaguely useful, although some of these use cases can be model
by chajath 5y ago
What pain point of Python as an education language is Pyret trying to address? Union type might be vaguely useful, although some of these use cases can be modelled as inheritance or typed enums.
- jpolitz 5y agoThis is a good question! We addressed this explicitly in our (new) book that starts in Pyret and transitions to Python: https://dcic-world.org/2021-08-21/part_appendix.html#%28part._pyret-vs-python%29 https://dcic-world.org/2021-08-21/part_appendix.html#%28part...
- sharno 5y agoIMHO, Union types are the one the most important features that should have been in programming languages since C. And I believe it would have made our software much more bug free than it is generally now. Enums in all languages should be Rust like enums with exhaustive checking and allow recursive definitions.