On Tue, 5 Jan 2021 08:52:54 +1100 Steven D'Aprano firstname.lastname@example.org wrote:
On Mon, Jan 04, 2021 at 01:38:23PM +0300, Paul Sokolovsky wrote:
There're tons of projects which introduce alternative braces (i.e. C-like) syntax for Python.
Got any examples of these projects? Preferably ones that are actively maintained,
But links were already posted: https://github.com/search?o=desc&q=python+braces&s=updated&type=... . That's even sorted by last updated. Not every project in that list is about "python braces", but there're enough.
have had more than one contributor, and have received even a modicum of community interest.
That's more complicated, because "every little boy and girl" who gets that bright idea gets to hacking right away without studying prior art. It takes decades of experience and contrarian nature to oppose that urge.
That said, https://github.com/mathialo/bython collected 255 stars and has 2 contributors, like you wish.
This one: https://github.com/umlet/pwk has only 94 stars, but even 3 contribs. More importantly, it got the motivational part right:
We love Python. We love them bash one-liners. We want to do one-liners in Python.
The most vivid real-world example of that I know is Frida the reverse-engineering framework (https://frida.re). The issue is so prominent that they admit it on the first page of the docs (https://frida.re/docs/home/):
I wonder, does anyone here remember more or less formal proposal for braces syntax?
I don't believe there has ever been such a proposal.
Thanks for confirming.
I'm not sure this is a productive use of your time.
Oh, no worries, I take it easy. It just was a new-year's resolution to get this matter tackled this year.
Why don't you do something more useful, like approaching the standards committee in charge of the C++ standard and try to convince them to remove braces from their language?
I don't think that approaching committees make any sense. The committees of decent languages have thought about that long ago, I gave Scheme as an example. And I personally don't care about C++, it's all ok with it in that regard (aka there're bigger problems than braces).
But if *you* want C/C++ with Python syntax, hold you monkey's paw tight: https://gitlab.com/hartsantler/tpythonpp/-/blob/master/tinypy/module_ode.aot... (I swear I saw more implementations of that, I just don't record them, because again, I'm personally not much interested in C-with-Python-syntax).
And in anticipation of your query for Rust with Python syntax, this guy: https://github.com/mys-lang/mys promised to forego python classes in preference to rust traits, last time I heard him talking. Dunno how far he got, I don't follow that project closely yet (too young, have a reminder to check it in half a year).