[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-19 Thread Guido van Rossum
People are free to continue to use python-dev, it just no longer has any official status, and many core devs and other key people have probably unsubscribed. I certainly have ignored this discussion here, even though (our of nostalgia, mostly) I am still subscribed. --Guido On Wed, Oct 19, 2022

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-19 Thread Antoine Pitrou
Haven't we migrated to Discourse? This discussion will probably not have any effects on this mailing-list. (yes, not everyone likes Discourse, and I'm skeptical as well, but the decision has been made by now) On Mon, 17 Oct 2022 09:13:34 - "Denis Kotov" wrote: > Stephen J. Turnbull

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Greg Ewing
On 17/10/22 10:13 pm, Denis Kotov wrote: For example, PyObject is much better to implement using C++ class, I used to think this. Python has OO features, C++ has OO features, should be a good match, right? Well, no. Python's OO is very flexible and dynamic, C++'s is very rigid and static.

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Matthias Görgens
CPython is written (mostly) in C. There's Jython written in Java. There also IronPython written on C#. Feel free to write your own Python implementation in C++. Could be fun! ___ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Paul Moore
On Mon, 17 Oct 2022 at 11:20, Denis Kotov wrote: > Stephen J. Turnbull wrote: > > Denis Kotov writes: > > > See: > > > https://youtube.com/clip/UgkxyNe_dsZKinT_RT3UGb-BaP0SnvKteo2o > > > No thanks, if it's not text I'm not going to look at it. I don't have > > time to watch videos with no

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Denis Kotov
Stephen J. Turnbull wrote: > Denis Kotov writes: > > See: > > https://youtube.com/clip/UgkxyNe_dsZKinT_RT3UGb-BaP0SnvKteo2o > > No thanks, if it's not text I'm not going to look at it. I don't have > time to watch videos with no explanation, and best guess is 90% of it > I already know, just as I

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Stephen J. Turnbull
Denis Kotov writes: > For example, PyObject is much better to implement using C++ class, > it will bring RAII that will reduce number of issues not free > memory in CPython Well, yes, that's the C++ Kool-Aid we're all supposed to drink. But it has its costs, too. How does it affect

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-10-17 Thread Denis Kotov
Stephen J. Turnbull wrote: > Denis Kotov writes: > > Usually people say that C++ not fit in CPython not knowing C++, > > That's not the issue. There are plenty of people who know C++ who say > the benefits of C++ are not worth the bugs, the effort, and the plain > old churn that a rewrite in C++

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-04-30 Thread Stephen J. Turnbull
Denis Kotov writes: > Yes, C++ ABI is specific to each compiler, but it is not a problem, > because you will anyway recompile CPython for each compiler !! Right, but the point is that we want few C++ compilers people really use to get upset by Python code. Since most changes are backward

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-04-30 Thread Denis Kotov
Stephen J. Turnbull wrote: > The point of C++ standard support level is linking CPython to external > codebases using C++, and at least for the standard CPython currently > supports, the C++ ABI is specific to each compiler and version (for > some compilers), right? Yes, C++ ABI is specific to

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-04-30 Thread Stephen J. Turnbull
Denis Kotov writes: > From huge codebase experience with C++, it does not cause > significantly better (1) Readabillity or (2) Maintainability on its > own compared to C But that's not what we're talking about. "Port CPython to C++" is a perennial suggestion that gets rejected fairly

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-04-29 Thread Denis Kotov
> From huge codebase experience with C++, it does not cause significantly better (1) Readabillity or (2) Maintainability on its own compared to C I would argue with you on that ... RAII is fundamental C++ feature that improves Maintainability !! Also readability is much better because you work

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-22 Thread Gregory P. Smith
On Thu, Jan 20, 2022 at 8:16 PM Dan Stromberg wrote: > > On Fri, Apr 16, 2021 at 11:13 AM Christian Heimes > wrote: > >> On 16/04/2021 19.14, redrad...@gmail.com wrote: >> > My personal stop of contributing in CPython is that it is written in >> pure C !! >> > I wrote code in both: pure C and

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-21 Thread Abdur-Rahmaan Janhangeer
I heard that rust has fewer target architectures. Is that a minus point with regards to C? Kind Regards, Abdur-Rahmaan Janhangeer about | blog github Mauritius

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-20 Thread Dan Stromberg
On Fri, Apr 16, 2021 at 11:13 AM Christian Heimes wrote: > On 16/04/2021 19.14, redrad...@gmail.com wrote: > > My personal stop of contributing in CPython is that it is written in > pure C !! > > I wrote code in both: pure C and C++, but I like writing code in C++, > because it simplifies things

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-17 Thread Paul Moore
On Mon, 17 Jan 2022 at 06:52, Denis Kotov wrote: > > And that's why you need to do more work than arguing that in principle > > C++ is just a better language than C. We've been hearing that for 4 > > decades now (at least we greybeards have), and we've discovered that > > for many existing

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-16 Thread Denis Kotov
Stephen J. Turnbull wrote: > You take a hunk of the standard library (in this case it would have to > be an accelerator written in C since you want to compare C++ vs. C) or > interpreter code, and translate it to the new syntax. > Now, *INCREF and friends are frequently cited as annoyances or even

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2022-01-16 Thread Denis Kotov
Yes, each compiler implement its own compiler ABI, but for me it is not a problem at all, just provide build with 3 major compilers gcc/clang (due to binary compatability) and Visual Studio ___ Python-Dev mailing list -- python-dev@python.org To

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-23 Thread gopinathinchennai01
How does C++ fare in binary compatibility? Last time I checked it out (about 10 years ago), there was completely none, every compiler's ABI https://www.credosystemz.com/courses/aws-training-chennai/ ___ Python-Dev mailing list -- python-dev@python.org

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-20 Thread Chris Angelico
On Wed, Apr 21, 2021 at 1:05 AM Skip Montanaro wrote: >> >> Perhaps there's some history in the python-dev archives that would inform >> you of previous discussions and help you repeating already-considered >> arguments. > > > This topic has come up a few times over the years. Maybe it would be

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-20 Thread Skip Montanaro
> > Perhaps there's some history in the python-dev archives that would inform > you of previous discussions and help you repeating already-considered > arguments. > This topic has come up a few times over the years. Maybe it would be worthwhile to have an informational PEP which documents the

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-20 Thread Steve Holden
On Fri, Apr 16, 2021 at 7:15 PM Denis Kotov wrote: > Ethan Furman wrote: > > On 4/16/21 10:43 AM, redrad...@gmail.com wrote: > > > Take a look at this video https://www.youtube.com/watch?v=D7Sd8A6_fYU > > > or read some articles ... otherwise I will need to spend too many time > providing

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-17 Thread Nick Coghlan
On Sun, 18 Apr 2021, 2:47 am Antoine Pitrou, wrote: > On Sun, 18 Apr 2021 02:13:57 +1000 > Nick Coghlan wrote: > > > > If > > they want automatic resource management, then we want them working out > how > > to lift the affected code out of C and into Python (for example, the > import > > system

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-17 Thread Antoine Pitrou
On Sun, 18 Apr 2021 02:13:57 +1000 Nick Coghlan wrote: > > If > they want automatic resource management, then we want them working out how > to lift the affected code out of C and into Python (for example, the import > system rewrite). There's a significant amount of wishful thinking here.

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-17 Thread Nick Coghlan
On Sat, 17 Apr 2021, 3:51 am , wrote: > Guys, the issue is that I most of the time see that somebody used C++ for > one or two times, did not understand it and left with bad taste ... > I've got more than a decade and a half of experience with both C++ (dating back to the relatively low quality

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-17 Thread Stephen J. Turnbull
Denis, There's a standard way of interesting the Python community in new syntax (and C++, while not Python, is new syntax in spades to this community ;-). You take a hunk of the standard library (in this case it would have to be an accelerator written in C since you want to compare C++ vs. C) or

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Denis Kotov
Christian Heimes wrote: > On 16/04/2021 19.14, redrad...@gmail.com wrote: > > My personal stop of contributing in CPython is that it is written in pure C > > !! > > I wrote code in both: pure C and C++, but I like writing code in C++, > > because it simplifies things without losing perfomance >

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Denis Kotov
Antoine Pitrou wrote: > On Fri, 16 Apr 2021 18:08:58 - > "Denis Kotov" redrad...@gmail.com wrote: > > Okay lets try to discuss one by one: > > > > Readability - less code, most code is hidden by abstraction without losing > > performance > > > > In CPython code lots of stuff like Py_INCREF,

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Antoine Pitrou
On Fri, 16 Apr 2021 18:08:58 - "Denis Kotov" wrote: > > Okay lets try to discuss one by one: > 1) Readability - less code, most code is hidden by abstraction without losing > performance > In CPython code lots of stuff like Py_INCREF, Py_DECREF .. it could be fixed > with C++

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread edwin
April 16, 2021 2:08 PM, "Denis Kotov" wrote: > edwin@211mainstreet.net wrote: > >> Anyone who has done a language change on a project knows that it is a huge >> disruption. You need >> solid justification to make such a change. All I have seen in this thread is >> personal opinion. >> Since

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Denis Kotov
Ethan Furman wrote: > On 4/16/21 10:43 AM, redrad...@gmail.com wrote: > > Take a look at this video https://www.youtube.com/watch?v=D7Sd8A6_fYU > > or read some articles ... otherwise I will need to spend too many time > > providing evidences to you and after all you will probably will reject >

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Denis Kotov
edwin@211mainstreet.net wrote: > Anyone who has done a language change on a project knows that it is a huge > disruption. You need solid justification to make such a change. All I have > seen in this thread is personal opinion. Since this is a personal opinion > exchange, I am of the humble

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Christian Heimes
On 16/04/2021 19.14, redrad...@gmail.com wrote: > My personal stop of contributing in CPython is that it is written in pure C !! > I wrote code in both: pure C and C++, but I like writing code in C++, because > it simplifies things without losing perfomance There are plenty of Open Source

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Ethan Furman
On 4/16/21 10:43 AM, redrad...@gmail.com wrote: Take a look at this video https://www.youtube.com/watch?v=D7Sd8A6_fYU or read some articles ... otherwise I will need to spend too many time providing evidences to you and after all you will probably will reject anyway (because lots of people is

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Ethan Furman
On 4/16/21 10:27 AM, redrad...@gmail.com wrote: Chris Angelico wrote: On Sat, Apr 17, 2021 at 3:20 AM redrad...@gmail.com wrote: The benefits: You will link with high quality libstdc++ with lots of reusable containers without writing your own "buggy" one. C++ is much much more maintainable

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread edwin
Anyone who has done a language change on a project knows that it is a huge disruption. You need solid justification to make such a change. All I have seen in this thread is personal opinion. Since this is a personal opinion exchange, I am of the humble opinion that the personal opinions of

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Christian Heimes
On 16/04/2021 19.39, Victor Stinner wrote: > A *fresh* build (after make clean) of CPython on my laptop (8 threads, > 4 CPU cores) takes 13 seconds using make -j10 and gcc -O0. A fresh > build in release mode (make -j10 and gcc -O3) takes 44 seconds on the > same laptop. $ make clean $ time make

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread redradist
Take a look at this video https://www.youtube.com/watch?v=D7Sd8A6_fYU or read some articles ... otherwise I will need to spend too many time providing evidences to you and after all you will probably will reject anyway (because lots of people is biased and they even do not understand that, it is

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread redradist
Guys, the issue is that I most of the time see that somebody used C++ for one or two times, did not understand it and left with bad taste ... Please, answer me question, if you will go in gym two times, will you get stop training and say that it does not fit in your life ?

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Victor Stinner
Hi, I used C++ in the past to write a small game. My experience was that the compilation was quite slow and many compiler errors were hard to understand. I love the fact the CPython is written in C because its build time is under one minute for a fresh build, and way faster for an incremental

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Chris Angelico
On Sat, Apr 17, 2021 at 3:32 AM wrote: > > Chris Angelico wrote: > > On Sat, Apr 17, 2021 at 3:20 AM redrad...@gmail.com wrote: > > > The benefits: > > > > > > You will link with high quality libstdc++ with lots of reusable > > > containers without writing your own "buggy" one. > > > C++ is much

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread redradist
Chris Angelico wrote: > On Sat, Apr 17, 2021 at 3:20 AM redrad...@gmail.com wrote: > > The benefits: > > > > You will link with high quality libstdc++ with lots of reusable containers > > without writing your own "buggy" one. > > C++ is much much more maintainable than pure C. It drastically

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Chris Angelico
On Sat, Apr 17, 2021 at 3:20 AM wrote: > > The benefits: > > 1. You will link with high quality libstdc++ with lots of reusable containers > without writing your own "buggy" one. > 2. C++ is much much more maintainable than pure C. It drastically increase > number of contributors that what like

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread redradist
The benefits: 1. You will link with high quality libstdc++ with lots of reusable containers without writing your own "buggy" one. 2. C++ is much much more maintainable than pure C. It drastically increase number of contributors that what like writing high quality and maintainable code without

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-16 Thread Serhiy Storchaka
24.03.21 11:54, redrad...@gmail.com пише: > What about of using modern C++ in developing CPython ? > > With C++ we can get the following benefits: > 1) Readability - less code, most code is hidden by abstraction without losing > performance > 2) Maintainability - no code duplication in favor of

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-04-15 Thread redradist
@Christian Heimes RAII is more than cleaning resource at the end of function, it is that while you are using class - resource will be available ... You can move resource using modern C++ `std::move` ant lots of other features that could improve readability and maintainability of the code

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-03-25 Thread Christian Heimes
On 25/03/2021 18.39, Antoine Pitrou wrote: > On Thu, 25 Mar 2021 20:22:55 +0300 > Ivan Pozdeev via Python-Dev wrote: >> On 24.03.2021 19:58, Antoine Pitrou wrote: >>> On Wed, 24 Mar 2021 19:45:49 +0300 >>> Ivan Pozdeev via Python-Dev wrote: How does C++ fare in binary compatibility? Last

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-03-25 Thread Antoine Pitrou
On Thu, 25 Mar 2021 20:22:55 +0300 Ivan Pozdeev via Python-Dev wrote: > On 24.03.2021 19:58, Antoine Pitrou wrote: > > On Wed, 24 Mar 2021 19:45:49 +0300 > > Ivan Pozdeev via Python-Dev wrote: > >> How does C++ fare in binary compatibility? Last time I checked it out > >> (about 10 years

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-03-25 Thread Ivan Pozdeev via Python-Dev
On 24.03.2021 19:58, Antoine Pitrou wrote: On Wed, 24 Mar 2021 19:45:49 +0300 Ivan Pozdeev via Python-Dev wrote: How does C++ fare in binary compatibility? Last time I checked it out (about 10 years ago), there was completely none, every compiler's ABI was a black box without any guarantees

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-03-24 Thread Antoine Pitrou
On Wed, 24 Mar 2021 19:45:49 +0300 Ivan Pozdeev via Python-Dev wrote: > How does C++ fare in binary compatibility? Last time I checked it out (about > 10 years ago), there was completely none, every compiler's ABI > was a black box without any guarantees whatsoever. > For any software that's

[Python-Dev] Re: How about using modern C++ in development of CPython ?

2021-03-24 Thread Ivan Pozdeev via Python-Dev
How does C++ fare in binary compatibility? Last time I checked it out (about 10 years ago), there was completely none, every compiler's ABI was a black box without any guarantees whatsoever. For any software that's going to dynamically link and exchange binary types with other independently