If the new syntax is just “syntactic sugar”—making an established way of doing things easier—I think you would have a strong argument. But if the current way of doing things is a well-established workaround for a language limitation, perhaps there is an opportunity to consider a language change?
I have worked with or written multiple frameworks for running workflows (including AWS StepFunctions, Cadence/Temporal, CWL, NextFlow, AirFlow, 3 different proprietary engines [2 of which I wrote], and my current quest framework). Proposing a language feature was not my first stop.
I think your example of “go to error” is a great use case for the feature.
Yes. I currently teach programming for a living. Developer experience (DevX) is an core part of my ongoing research. I honestly think this feature would be easier to teach than := or match expressions.
I’ve also considered core internals, but admittedly have less experience there. I figured that if a core CPython developer thought it was reasonable to float a more expansive version of goto, then a more restricted version should probably be viable (yes, I read your other thread before I started this one.
)
Difficulty is certainly in the eye of the beholder. For me, personally, it has never been difficult to set my cursor at a given level of indentation and scroll. But if tracking if-elif is considered difficult, then yes, mark would be as difficult.
Yes, my simple toy examples are, well, simple. And simple things are easy to reconstruct in different ways. When you boil an example down to its essence, you risk it being treated as a straw man.
I think there is an opportunity for the Python community to consider a new way to think about problems, not just refine the current way we think about problems. What kinds of algorithms could we make, and how simply would they be expressed if we had a more direct way to describe them?
As a workflow author, I often encounter situations where the simplest, most straightforward approach would be to say “go back to this line” or “jump ahead and skip this part”. But Python currently requires reformulating those simple concepts into terms of loops, branches, and functions.