ModularM
Modular3y ago
12 replies
jordiae

Examples of Python code that will never work with Mojo?

Hello, afaik, Mojo is intended to be a Python superset (a sort of Python++), but at the same time, Modular has made it very clear that Mojo won’t be a “Python compiler, implying that some of the more dynamic Python features won’t work as expected in Mojo (that’s what I understood from some of the Q&A sessions and interviews).

Do you have any specific examples of Python features that will never work with Mojo, not because they aren’t supported yet, but because by design Mojo won’t be able (or willing) to compile them?

For example, redefining intrinsics/builtins? Walking and modifying its own AST and semantics (as some Python-based DSLs do)? Deleting and redefining class methods or attributes? C extensions, C++/Rust bindings?
Was this page helpful?