Skip to content

Is the parser technology gap between MP and CPython going to pose a serious problem? #8507

Closed
@RayaneCTX

Description

@RayaneCTX

I feel that MicroPython's desire to keep up with CPython's language features is coming into serious conflict with the fact that CPython's parser technology is superior (PEG parser since Python 3.9). I believe that that fact alone will increasingly and disproportionately contribute to a widening gap between MicroPython and CPython. For example, I have recently been looking at implementing two syntax features: #8479 (function keyword syntax restriction) and #8503 (decorator syntax relaxation), and really, both of these changes should have almost exclusively been grammar changes, and that is quite far from the case. I know these are a lot of moving parts and variables to consider; I just feel that way, and I am willing to believe that the symptoms I am noticing can be solved through cleaner, more modular code rather than a parser overhaul. My concern is as follows: how effectively can we keep up with CPython's syntax features while mitigating the "spaghettification" of our code?

What do you feel? Too early to tell? Chasing ghosts? Or are we indeed sitting on a timed bomb?

For reference, #7847 (comment) discusses a bit why a PEG parser wouldn't be practical for an embedded system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    py-coreRelates to py/ directory in source

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy