|
|
|
|
|
by jadodev
1151 days ago
|
|
The goal is for the language to be a superset of Python > Further, we decided that the right long-term goal for Mojo is to provide a superset of Python (i.e. be compatible with existing programs) and to embrace the CPython immediately for long-tail ecosystem enablement. https://docs.modular.com/mojo/why-mojo.html |
|
https://docs.modular.com/mojo/why-mojo.html#intentional-diff...
> our approach to compatibility is two fold:
> 1. We utilize CPython to run all existing Python3 code “out of the box” without modification and use its runtime, unmodified, for full compatibility with the entire ecosystem.
> 2. We will provide a mechanical migrator that provides very good compatibility for people who want to move Python code to Mojo.
> Together, this allows Mojo to integrate well in a mostly-CPython world, but allows Mojo programmers to be able to progressively move code (a module or file at a time) to Mojo. This approach was used and proved by the Objective-C to Swift migration that Apple performed.
Maybe the long-term goal is to try to make it a true superset, but it sounds like the detailed plan is more practical, to basically provide a "Python-next" language, like Swift for Objective-C.