-
-
Notifications
You must be signed in to change notification settings - Fork 59
-
Does not this means erg has only Interoperability with Cpython? I think python is not only Cpython
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Erg also has a backend that outputs Python scripts, but this is an experimental feature.
It may also be possible that a Python processor compatible with CPython bytecode (e.g. PyPy?) could be used as an interpreter for Erg, but this is not guaranteed.
Why are we mainly developing a CPython bytecode backend? The reason is to gain syntactic/semantic freedom.
Erg uses Python as a backend to access Python assets, but syntactically and semantically they are very different.
It is difficult to treat Erg and Python in the same representation without lowering it to the bytecode level.
For example, a backend that transpiles to Python scripts cannot use the inline module feature of Erg. Also, Python's match statement was introduced in Python 3.10, but Erg's match expression (not statement) does not use it and is therefore available regardless of the version of Python being used.
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1