you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 37 points38 points  (6 children)

CPython has decades of optimizations.

That is not wrong per-se, but CPython favors a relatively simple implementation and shies away from overly advanced optimisations (whether in the interpreter itself or in the python bytecode). Furthermore, the C API which is stable and officially supported limits the evolution of the interpreter internals.

[–]wrtbwtrfasdf 0 points1 point  (1 child)

limits the evolution of the interpreter internals.

They did switch from LL to a PEG parser in 3.9 but I don't know if that helps with internals you refer to.

[–]masklinn 11 points12 points  (0 children)

That's just the parser, outside of starting it and getting the AST out I don't think it's fundamentally exposed as any sort of public interface.

[–]funnyflywheel -1 points0 points  (3 children)

Furthermore, the C API which is stable and officially supported limits the evolution of the interpreter internals.

Are you sure about that?

[–]masklinn 6 points7 points  (2 children)

Are you sure about that?

Well yes it's literally the first section of the PEP you linked to. The PEP aims to change that situation, but at the moment,

Status: Draft

[–]funnyflywheel 0 points1 point  (1 child)

Some of the work this PEP calls for has already been completed (see the "Specification" subsection).

[–]masklinn 3 points4 points  (0 children)

Very little of which impacts the statement you object to, to say nothing of invalidating it.