Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: "CPython"

58 views
Skip to first unread message

Paulo da Silva

unread,
Jun 20, 2022, 3:02:13 PM6/20/22
to
Às 18:19 de 20/06/22, Stefan Ram escreveu:
> The same personality traits that make people react
> to troll postings might make them spread unconfirmed
> ideas about the meaning of "C" in "CPython".
>
> The /core/ of CPython is written in C.
>
> CPython is the /canonical/ implementation of Python.
>
> The "C" in "CPython" stands for C.
>
>

Not so "unconfirmed"!
Look at this article, I recently read:
https://www.analyticsinsight.net/cpython-to-step-over-javascript-in-developing-web-applications/

There is a sentence in ther that begins with "CPython, short for Core
Python, a reference implementation that other Python distributions are
derived from, ...".

Anyway, I wrote "IMHO".

Do you have any credible reference to your assertion "The "C" in
"CPython" stands for C."?

Thank you.

Dennis Lee Bieber

unread,
Jun 20, 2022, 3:31:55 PM6/20/22
to
On Mon, 20 Jun 2022 20:01:51 +0100, Paulo da Silva
<p_d_a_s_i...@nonetnoaddress.pt> declaimed the following:


>Not so "unconfirmed"!
>Look at this article, I recently read:
>https://www.analyticsinsight.net/cpython-to-step-over-javascript-in-developing-web-applications/
>
>There is a sentence in ther that begins with "CPython, short for Core
>Python, a reference implementation that other Python distributions are
>derived from, ...".
>
>Anyway, I wrote "IMHO".
>
>Do you have any credible reference to your assertion "The "C" in
>"CPython" stands for C."?
>

Well, let's start at the top...

https://www.python.org/download/alternatives/ ("traditional" implying
implemented in C).
https://en.wikipedia.org/wiki/CPython

https://stackoverflow.com/questions/17130975/python-vs-cpython
https://www.c-sharpcorner.com/article/why-learn-python-an-introduction-to-python/
https://www.geeksforgeeks.org/difference-various-implementations-python/

There is some plagiarism between a number of web-sites, but they all
emphasize the "CPython" is a reference implementation and that it is
written in C vs Java (Jython), C# (IronPython -- which M$ may be
deprecating these days, based on some stuff in my last Visual Studio
update), or other....


--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

Chris Angelico

unread,
Jun 20, 2022, 5:12:34 PM6/20/22
to
On Tue, 21 Jun 2022 at 06:31, Stefan Ram <r...@zedat.fu-berlin.de> wrote:
>
> Paulo da Silva <p_d_a_s_i...@nonetnoaddress.pt> writes:
> >Do you have any credible reference to your assertion "The "C" in
> >"CPython" stands for C."?
>
> Whether a source is considered "credible" is something
> everyone must decide for themselves.
>
> I can say that the overwhelming majority of results of Web
> searches about this topic yields expressions of the view
> that the "C" in "CPython" stands for C, "overwhelming
> majority" when compared to expressions of other interpretations
> of that "C", and "overwhelming majority" meaning something
> like more than 90 percent.
>
> For one example, there seems to be a book "CPython Internals"
> which seems to say, according to one Web search engine:
>
> |The C in CPython is a reference to the C programming
> |language, indicating that this Python distribution is
> |written in the C language.
>

Does python.org count as "credible"?

https://docs.python.org/3/reference/introduction.html

CPython: This is the original and most-maintained implementation of
Python, written in C.

I think that's about as close as you're going to get to an answer.
Given that it is, in that page, being distinguished from Jython
(implemented in Python), PyPy (implemented in Python), Python for .NET
(implemented for the .NET runtime), and IronPython (one of these is
not like the others, whatever, but it's the one originally implemented
for .NET), it seems fairly safe to say that the C in CPython means the
implementation language.

If someone wants to contradict this, they'll need a strong source,
like a post from a core dev back when Jython was brand new.

ChrisA

Roel Schroeven

unread,
Jun 20, 2022, 5:47:44 PM6/20/22
to
Paulo da Silva schreef op 20/06/2022 om 21:01:
> Às 18:19 de 20/06/22, Stefan Ram escreveu:
> > The same personality traits that make people react
> > to troll postings might make them spread unconfirmed
> > ideas about the meaning of "C" in "CPython".
> >
> > The /core/ of CPython is written in C.
> >
> > CPython is the /canonical/ implementation of Python.
> >
> > The "C" in "CPython" stands for C.
> >
> >
>
> Not so "unconfirmed"!
> Look at this article, I recently read:
> https://www.analyticsinsight.net/cpython-to-step-over-javascript-in-developing-web-applications/
>
> There is a sentence in ther that begins with "CPython, short for Core
> Python, a reference implementation that other Python distributions are
> derived from, ...".

Counterpoint: https://wiki.python.org/moin/SummerOfCode/2017/python-core
says "The reference implementation of Python is CPython, so named
because it's written in C." Even in the absence of other evidence I'd
much rather trust a python.org page than a www.analyticsinsight.net page
on the subject of Python implementations.

But there's more.

Apart from www.analyticsinsight.net I can't find any website that
mentions "Core Python" as a Python implementation. That's a strong
indication that www.analyticsinsight.net is wrong on that point. Frankly
that website seems very low quality in general. In that same article
they say:

"CPython is a descendant of Pyscript built on Pyodide, a port of
CPython, or a Python distribution for the browser and Node.js that is
based on Webassembly and Emscripten."

CPython is definitely not a descendant of Pyscript! Looks like someone
found something (semi-) interesting and tried to write something
insightful about it, but without really understanding any of it. Other
articles don't seem to be any better.

So we have an untrustworthy site that's the only one to claim that
CPython is short for Core Python, and we have an official site that says
CPython is so named because it's written in C. Hm, which one to believe?

--
"In the old days, writers used to sit in front of a typewriter and stare out of
the window. Nowadays, because of the marvels of convergent technology, the thing
you type on and the window you stare out of are now the same thing.”
-- Douglas Adams

dn

unread,
Jun 20, 2022, 6:00:49 PM6/20/22
to
On 21/06/2022 09.47, Roel Schroeven wrote:
...

> So we have an untrustworthy site that's the only one to claim that
> CPython is short for Core Python, and we have an official site that says
> CPython is so named because it's written in C. Hm, which one to believe?


...and so you can C that the only important part is the Python!
--
Regards,
=dn

Chris Angelico

unread,
Jun 20, 2022, 6:02:45 PM6/20/22
to
On Tue, 21 Jun 2022 at 07:48, Roel Schroeven <ro...@roelschroeven.net> wrote:
>
> Paulo da Silva schreef op 20/06/2022 om 21:01:
> > Às 18:19 de 20/06/22, Stefan Ram escreveu:
> > > The same personality traits that make people react
> > > to troll postings might make them spread unconfirmed
> > > ideas about the meaning of "C" in "CPython".
> > >
> > > The /core/ of CPython is written in C.
> > >
> > > CPython is the /canonical/ implementation of Python.
> > >
> > > The "C" in "CPython" stands for C.
> > >
> > >
> >
> > Not so "unconfirmed"!
> > Look at this article, I recently read:
> > https://www.analyticsinsight.net/cpython-to-step-over-javascript-in-developing-web-applications/
> >
> > There is a sentence in ther that begins with "CPython, short for Core
> > Python, a reference implementation that other Python distributions are
> > derived from, ...".
>
> Counterpoint: https://wiki.python.org/moin/SummerOfCode/2017/python-core
> says "The reference implementation of Python is CPython, so named
> because it's written in C." Even in the absence of other evidence I'd
> much rather trust a python.org page than a www.analyticsinsight.net page
> on the subject of Python implementations.

Be aware that this is a wiki, so anyone can edit it. But that also
means you can check the "Info" link to see the history of the page,
and in this case, the text in question was added by user TerriOda, who
- as can be confirmed in various places - is heavily involved in GSOC
Python projects and the like, so I would consider this to be fairly
good information.

(Though I can't honestly say whether many of the core Python devs read
that wiki, so it's always possible that false information stays there
untouched.)

> But there's more.
>
> Apart from www.analyticsinsight.net I can't find any website that
> mentions "Core Python" as a Python implementation. That's a strong
> indication that www.analyticsinsight.net is wrong on that point. Frankly
> that website seems very low quality in general. In that same article
> they say:
>
> "CPython is a descendant of Pyscript built on Pyodide, a port of
> CPython, or a Python distribution for the browser and Node.js that is
> based on Webassembly and Emscripten."
>
> CPython is definitely not a descendant of Pyscript! Looks like someone
> found something (semi-) interesting and tried to write something
> insightful about it, but without really understanding any of it. Other
> articles don't seem to be any better.
>
> So we have an untrustworthy site that's the only one to claim that
> CPython is short for Core Python, and we have an official site that says
> CPython is so named because it's written in C. Hm, which one to believe?
>

I think that's about as settled as it'll ever be. Like many things, it
doesn't necessarily have any stronger origin than "someone started
using the term, and it stuck". Reminds me of trying to research the
origin of the name "Idle" (or "IDLE" - the Integrated Development and
Learning Environment") and being unable to find any proof that it was
named after a certain Eric, but nothing to disprove it either...

ChrisA

Chris Angelico

unread,
Jun 20, 2022, 6:03:10 PM6/20/22
to
On Tue, 21 Jun 2022 at 08:01, dn <Pytho...@danceswithmice.info> wrote:
>
> On 21/06/2022 09.47, Roel Schroeven wrote:
> ...
>
> > So we have an untrustworthy site that's the only one to claim that
> > CPython is short for Core Python, and we have an official site that says
> > CPython is so named because it's written in C. Hm, which one to believe?
>
>
> ...and so you can C that the only important part is the Python!

I should have cn that coming.

ChrisA

dn

unread,
Jun 20, 2022, 6:25:34 PM6/20/22
to
Which is a terribly OT invitation to make the (these days non-PC) Monty
Python joke: "No-one expects the Spanish Inquisition"
(https://www.youtube.com/watch?v=Cj8n4MfhjUc)
--
Regards,
=dn

Paulo da Silva

unread,
Jun 20, 2022, 8:53:57 PM6/20/22
to
Às 20:01 de 20/06/22, Paulo da Silva escreveu:
Well ... I read the responses and they are not touching the point!
I just answered, with my opinion based on articles I have read in the
past. Certainly I could not be sure. That's why I responded as an
opinion (IMHO) and not as an assertion.
Stefan Ram responded with a, at least, not very polite post.
That's why I needed to somehow "defend" why I posted that response, and,
BTW, trying to learn why he said that the C in CPython means "written in C".

I still find very strange, to not say weird, that a compiler or
interpreter has a name based in the language it was written. But, again,
is just my opinion and nothing more.

I rest my case.
Thank you all.

Chris Angelico

unread,
Jun 20, 2022, 9:33:57 PM6/20/22
to
Not sure why it's strange. The point is to distinguish "CPython" from
"Jython" or "Brython" or "PyPy" or any of the other implementations.
Yes, CPython has a special place because it's the reference
implementation and the most popular, but the one thing that makes it
distinct from all the others is that it's implemented in C.

I could, perhaps, create my own interpreter and name it "RosuavPython"
after myself, but when something's made by a team, it's usually more
useful to pick something that is fundamental to it (Brython is
designed to be run in a browser, Jython is written in Python to make
it easy to call on Java classes, etc).

ChrisA

Paul Rubin

unread,
Jun 20, 2022, 10:04:29 PM6/20/22
to
Chris Angelico <ros...@gmail.com> writes:
> Yes, CPython has a special place because it's the reference
> implementation and the most popular, but the one thing that makes it
> distinct from all the others is that it's implemented in C.

MicroPython is also written in C, heh.

MRAB

unread,
Jun 20, 2022, 10:23:45 PM6/20/22
to
On 2022-06-21 02:33, Chris Angelico wrote:
> On Tue, 21 Jun 2022 at 11:13, Paulo da Silva
> <p_d_a_s_i...@nonetnoaddress.pt> wrote:
>>
> Not sure why it's strange. The point is to distinguish "CPython" from
> "Jython" or "Brython" or "PyPy" or any of the other implementations.
> Yes, CPython has a special place because it's the reference
> implementation and the most popular, but the one thing that makes it
> distinct from all the others is that it's implemented in C.
>
And just to make it clear, the interpreter/compiler _itself_ is still
called "python". "CPython" is a name/term that was applied retroactively
to that particular implementation when another implementation appeared.

Paulo da Silva

unread,
Jun 20, 2022, 10:38:35 PM6/20/22
to
Às 02:33 de 21/06/22, Chris Angelico escreveu:
Notice that they are, for example, Jython and not JPython.
There is also Cython that is a different thing.

And YES. You have the right to not feel that as strange.

Regards
Paulo

Avi Gross

unread,
Jun 20, 2022, 10:52:54 PM6/20/22
to

This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called?
C++Python
CPython++
C+Python+
DPython
SeaPython?
SeeSeaSiPython

I don't even want to think fo what sound a C# Python would make.
OK, my apologies to all. Being an interpreted language, it makes sense for a good part of the interpreter to include parts made in other languages and also add-on libraries in even older languages like FORTRAN.  Quite a few languages, including some like R, are also partially based on C in similar ways. 
--
https://mail.python.org/mailman/listinfo/python-list

Paulo da Silva

unread,
Jun 20, 2022, 10:56:25 PM6/20/22
to
Às 03:20 de 21/06/22, MRAB escreveu:
Yes, but that does not necessarily means that the C has to refer to the
language of implementation. It may well be a "core" reference to
distinguish that implementation from others with different behaviors.

Let's say they reimplement "reference python" CPython in Rust. What is
better? Change the "reference python" CPython name to RPython, for
example, or let it as CPython?
It's my opinion that it should stay as CPython.
After all who cares in which language it is implemented?

Regards.
Paulo

Chris Angelico

unread,
Jun 21, 2022, 1:12:40 AM6/21/22
to
On Tue, 21 Jun 2022 at 12:53, Avi Gross via Python-list
<pytho...@python.org> wrote:
>
> I don't even want to think fo what sound a C# Python would make.

Probably about 277 Hz...

ChrisA

Chris Angelico

unread,
Jun 21, 2022, 1:16:03 AM6/21/22
to
On Tue, 21 Jun 2022 at 13:12, Paulo da Silva
It is HIGHLY unlikely that the reference implementation would change
overnight. Far far more likely, if the reference implementation were
to change, would be that the new interpreter is built for a number of
years as an alternative, and then eventually becomes the more popular
implementation, and finally, the core devs begin using that more than
CPython, and perhaps deprecating CPython altogether. If that were to
happen, the other implementation would have its own name for all those
years, and would keep it after being promoted to reference
implementation.

Also, "PyPy" is a perfectly fine name and doesn't need to be changed.

ChrisA

Greg Ewing

unread,
Jun 21, 2022, 3:48:41 AM6/21/22
to
On 21/06/22 2:38 pm, Paulo da Silva wrote:
> Notice that they are, for example, Jython and not JPython.

Jython *was* originally called JPython, but that was judged to be
a trademark violation and they were made to change it.

I don't know how MicroPython has escaped the same fate to date.

--
Greg

Greg Ewing

unread,
Jun 21, 2022, 3:49:50 AM6/21/22
to
On 21/06/22 2:52 pm, Avi Gross wrote:
>
> This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called?

(Pronounced with a comical stutter) "C-p-p-python!")

--
Greg

Greg Ewing

unread,
Jun 21, 2022, 3:54:13 AM6/21/22
to
On 21/06/22 2:56 pm, Paulo da Silva wrote:
> Let's say they reimplement "reference python" CPython in Rust. What is
> better? Change the "reference python" CPython name to RPython, for
> example, or let it as CPython?

The C implementation would still be called CPython, and the new
implementation might be called RPython, or RustyPython, or whatever.
The names are independent of which one is currently blessed as the
reference implementation.

Although if it were called RPython, no doubt a new debate would
flare up over whether the "R" stands for "Rust" or "Reference"...

--
Greg

jak

unread,
Jun 21, 2022, 4:11:57 AM6/21/22
to
Il 21/06/2022 04:56, Paulo da Silva ha scritto:
> Às 03:20 de 21/06/22, MRAB escreveu:
>> On 2022-06-21 02:33, Chris Angelico wrote:
>>> On Tue, 21 Jun 2022 at 11:13, Paulo da Silva
>>> <p_d_a_s_i...@nonetnoaddress.pt> wrote:
>>>>
>>>> Às 20:01 de 20/06/22, Paulo da Silva escreveu:
>>>> > Às 18:19 de 20/06/22, Stefan Ram escreveu:

[snip]

> After all who cares in which language it is implemented?
>
> Regards.
> Paulo


Why are you asking this? The Facebook platform which is mainly developed
in Rust are converting it to C to make it faster and lighter. If as
often happens, many people complain about the speed of python, what
would be the purpose of translating python using a slower language?

Christian Gollwitzer

unread,
Jun 21, 2022, 4:38:11 AM6/21/22
to
Am 20.06.22 um 22:47 schrieb Roel Schroeven:
> indication that www.analyticsinsight.net is wrong on that point. Frankly
> that website seems very low quality in general. In that same article
> they say:
>
> "CPython is a descendant of Pyscript built on Pyodide, a port of
> CPython, or a Python distribution for the browser and Node.js that is
> based on Webassembly and Emscripten."
>
> CPython is definitely not a descendant of Pyscript! Looks like someone
> found something (semi-) interesting and tried to write something
> insightful about it, but without really understanding any of it. Other
> articles don't seem to be any better.

To me, this sentence is so badly cobbled together that it could be the
output of a KI of some sort (GPT-3) trying to summarize stuff from the
web. It doesn't make any sense at all on a semantic level.

Christian

Greg Ewing

unread,
Jun 21, 2022, 5:11:38 AM6/21/22
to
On 21/06/22 8:37 pm, Christian Gollwitzer wrote:
> Am 20.06.22 um 22:47 schrieb Roel Schroeven:
>> "CPython is a descendant of Pyscript built on Pyodide, a port of
>> CPython, or a Python distribution for the browser and Node.js that is
>> based on Webassembly and Emscripten."
>>
> To me, this sentence is so badly cobbled together that it could be the
> output of a KI of some sort (GPT-3) trying to summarize stuff from the
> web.

It looks to me like the output of a Markov chain that's been fed
with all the latest programming buzzwords.

--
Greg

Paul Rubin

unread,
Jun 21, 2022, 5:27:50 AM6/21/22
to
Greg Ewing <greg....@canterbury.ac.nz> writes:
> Jython *was* originally called JPython, but that was judged to be
> a trademark violation and they were made to change it.

What? I never heard of such a dispute. The PSF got after someone about
it? Sheesh.

> I don't know how MicroPython has escaped the same fate to date.

Also IronPython, CircuitPython, and maybe a few others.

Dennis Lee Bieber

unread,
Jun 21, 2022, 8:30:08 AM6/21/22
to
On Tue, 21 Jun 2022 01:53:38 +0100, Paulo da Silva
<p_d_a_s_i...@nonetnoaddress.pt> declaimed the following:


>I still find very strange, to not say weird, that a compiler or
>interpreter has a name based in the language it was written. But, again,
>is just my opinion and nothing more.
>

The whole purpose for that was to differentiate from Python /language/
implemented in OTHER languages. IronPython is a M$ .NET/C# implementation,
Jython is a JVM/Java implementation.

When you just say "Python" you are referring to ALL of those
implementations.

Greg Ewing

unread,
Jun 21, 2022, 8:31:58 AM6/21/22
to
On 21/06/22 9:27 pm, Paul Rubin wrote:
> What? I never heard of such a dispute. The PSF got after someone about
> it? Sheesh.

Upon further research, it seems it wasn't the *Python* trademark that
was at issue. From the Jython FAQ page:


1.2 How does Jython relate to JPython?

Jython is the successor to JPython. The Jython project was created in
accordance with the CNRI JPython 1.1.x license, in order to ensure the
continued existence and development of this important piece of Python
software. The intent is to manage this project with the same open
policies that are serving CPython so well.

The name had to be changed to something other than JPython, because of
paragraph 4 in the JPython-1.1 license:

4. Licensee may not use CNRI trademarks or trade name, including
JPython [...] to endorse or promote products [...]


So there was no dispute, they were just following the terms of a
licence.

--
Greg

Dennis Lee Bieber

unread,
Jun 21, 2022, 8:34:48 AM6/21/22
to
On Tue, 21 Jun 2022 19:53:51 +1200, Greg Ewing
<greg....@canterbury.ac.nz> declaimed the following:

>Although if it were called RPython, no doubt a new debate would
>flare up over whether the "R" stands for "Rust" or "Reference"...

Or does RPython refer to a Python integrated into the R statistics
system? <G>

Actually -- RPython is already taken...
https://rpython.readthedocs.io/en/latest/

"""
RPython is a translation and support framework for producing
implementations of dynamic languages, emphasizing a clean separation
between language specification and implementation aspects.

By separating concerns in this way, our implementation of Python - and
other dynamic languages - is able to automatically generate a Just-in-Time
compiler for any dynamic language. It also allows a mix-and-match approach
to implementation decisions, including many that have historically been
outside of a user’s control, such as target platform, memory and threading
models, garbage collection strategies, and optimizations applied, including
whether or not to have a JIT in the first place.

Dennis Lee Bieber

unread,
Jun 21, 2022, 8:37:14 AM6/21/22
to
tOn Tue, 21 Jun 2022 02:52:28 +0000 (UTC), Avi Gross <avig...@verizon.net>
declaimed the following:

>
>I don't even want to think fo what sound a C# Python would make.

A musical hiss on a frequency of 277.183Hz (for the C# above middle-C)

Grant Edwards

unread,
Jun 21, 2022, 9:09:27 AM6/21/22
to
On 2022-06-21, Chris Angelico <ros...@gmail.com> wrote:

> Not sure why it's strange. The point is to distinguish "CPython" from
> "Jython" or "Brython" or "PyPy" or any of the other implementations.
> Yes, CPython has a special place because it's the reference
> implementation and the most popular, but the one thing that makes it
> distinct from all the others is that it's implemented in C.

I've been using CPython (and reading this list) for over 20 years, and
there's no doubt in my mind that the C in CPython has always been
interpreted by 99+ percent of the Python community as meaning the
implementation language.

Sort of like ckermit <https://www.kermitproject.org/> was the original
implementation of Kermit written in C. At the time, the other popular
implementations (for DOS, IBM, etc.) were written in assembly.

--
Grant


Eryk Sun

unread,
Jun 21, 2022, 9:21:28 AM6/21/22
to
On 6/20/22, Paulo da Silva <p_d_a_s_i...@nonetnoaddress.pt> wrote:
>
> Yes, but that does not necessarily means that the C has to refer to the
> language of implementation. It may well be a "core" reference to
> distinguish that implementation from others with different behaviors.

If the reference implementation and API ever switched to a different
programming language, I'd personally be fine with changing the 'C" in
"CPython" to mean "canonical", but not "core". The term "core" is used
for building the interpreter core with access to internals (i.e.
Py_BUILD_CORE, Py_BUILD_CORE_BUILTIN, Py_BUILD_CORE_MODULE, and
Include/internal/pycore*.h). It does not refer to the overall
implementation and API for embedding and extension modules.

MRAB

unread,
Jun 21, 2022, 12:42:38 PM6/21/22
to
On 2022-06-21 03:52, Avi Gross via Python-list wrote:
>
> This leads to the extremely important question of what would an implementation of Python, written completely in C++, be called?
> C++Python
> CPython++
> C+Python+
> DPython
> SeaPython?
> SeeSeaSiPython
>
CincPython?

FYI, there's a language called D, so DPython would be written in that.

> I don't even want to think fo what sound a C# Python would make.
> OK, my apologies to all. Being an interpreted language, it makes sense for a good part of the interpreter to include parts made in other languages and also add-on libraries in even older languages like FORTRAN.  Quite a few languages, including some like R, are also partially based on C in similar ways.
[snip]

MRAB

unread,
Jun 21, 2022, 12:45:12 PM6/21/22
to
Jython was originally called JPython.

Avi Gross

unread,
Jun 21, 2022, 1:02:51 PM6/21/22
to
If we want to be humorous, RPython would obviously either be written in R, which really is not designed well for such purposes, or would be some kind of synthesis that already exists that allows you to run R and python code interchangeably on sort of shared data that I sometimes do in RSTUDIO.

I like the way you think Greg. I did not consider how the ++ in C++ is a bit like stuttering and since python also starts with a P the effect would be something like C-p-p-python.

My problem with that idea is, believe it or not, that it is too negative. What you meant to be seen as a dash is a minus sign to me. And both C and C++ not only have both a pre and post autoincrement variable using ++x and x++, they also have autodecrement operators using a minus sign such as --x and x-- and it can get pretty weird trying to figure out if some code is legal, let alone what it does, without parentheses. I mean what the heck does this do?

y = x++-++x

The truth is that although I remember Bjarne trying to figure out a good name for his somewhat improved language and his choice of C++ rather than D or some other gimmick, you could argue he also removed a bit from C. But who would call a language C-- ??
Back to serious. This discussion is more about names but is it?
Some of the implementations of Python are not just written in some computer language but also in a sort of environment. Arguably some core of functionality has to be pretty much consistent to the language definition. But each may add interesting twists on its own and that can include the ability to easily link in code and libraries written in that language or used in that environment. You can have different supersets of a language.
And it can impact where you might use the language as one reason people may not understand for using C is that a compiler was available for just about anywhere that either ran in that environment or could be run on another to produce lower-level code to copy to it. It was also possible to embed code in C that was evaluated differently in each environment for some level of fine-tuning.
Some of that may eventually have been true for other implementations but I suspect not for some deliberately designed to fit what one party wants and with no care that it be shared elsewhere especially as the C version was already available there.
Or am I wrong? After all, others who kept improving C thought the ++ concept was best removed!
--
https://mail.python.org/mailman/listinfo/python-list

2QdxY4Rz...@potatochowder.com

unread,
Jun 21, 2022, 1:24:55 PM6/21/22
to
On 2022-06-21 at 17:04:45 +0000,
Avi Gross via Python-list <pytho...@python.org> wrote:

> My problem with that idea is, believe it or not, that it is too negative. What you meant to be seen as a dash is a minus sign to me. And both C and C++ not only have both a pre and post autoincrement variable using ++x and x++, they also have autodecrement operators using a minus sign such as --x and x-- and it can get pretty weird trying to figure out if some code is legal, let alone what it does, without parentheses. I mean what the heck does this do?
>
> y = x++-++x

That code evokes (or at least can evoke) nasal demons.

https://en.wikipedia.org/wiki/Undefined_behavior

jkn

unread,
Jun 21, 2022, 4:22:43 PM6/21/22
to
Same here, on both counts (20+ years on this Usenet group,
and CPython == "the canonical C implementation of Python")

Actually, on all three counts - I remember ckermit as well ;-)

Fourthly...

J^n

Greg Ewing

unread,
Jun 21, 2022, 8:52:11 PM6/21/22
to
On 22/06/22 4:42 am, MRAB wrote:
> On 2022-06-21 03:52, Avi Gross via Python-list wrote:
>>
>> This leads to the extremely important question of what would an
>> implementation of Python, written completely in C++, be called?
>> C++Python
>> CPython++
>> C+Python+
>> DPython
>> SeaPython?
>> SeeSeaSiPython
>>
> CincPython?

Python+=1

--
Greg

Paul Rubin

unread,
Jun 21, 2022, 9:59:01 PM6/21/22
to
Greg Ewing <greg....@canterbury.ac.nz> writes:
> Python+=1

I think you mean python.__next__()

David J W

unread,
Jun 23, 2022, 10:52:09 AM6/23/22
to
>> Let's say they reimplement "reference python" CPython in Rust. What is
>> better? Change the "reference python" CPython name to RPython, for
>> example, or let it as CPython?

>The C implementation would still be called CPython, and the new
>implementation might be called RPython, or RustyPython, or whatever.
>The names are independent of which one is currently blessed as the
>reference implementation.

I am at the pre planning stages of making a Rust implementation of the
Python virtual machine and to avoid ambiguity I've been working with Rython
as the name. I tried looking for a Monty Python themed name but the good
ones seem to be taken.

Otherwise as for a timeline, solo I figure it's going to take me a couple
years to get something that actually passes cpython's python unit-tests.

Avi Gross

unread,
Jun 23, 2022, 11:42:52 AM6/23/22
to
David,
I am curious why you are undertaking the effort to take a language already decades old and showing signs of being a tad rusty into a language that suggests further oxidation.
More seriously, I am interested in what this can gain and the intended user base. I studied Rust for a while and it has it's features but have had no opportunity to use it. Is it expected to make a faster version of Python, or enable better connections to libraries and so on? 
What I mean is that if you are planning on making it pass all tests for python functionality, are you also adding unique features or ... ?
My preference is to have names that fully include what they are about. So the name "python" would be left intact rather than mangled, even if the name itself happens to be totally meaningless. So may I suggest something like """rustic-python""" ?
--
https://mail.python.org/mailman/listinfo/python-list

David J W

unread,
Jun 24, 2022, 11:57:56 AM6/24/22
to
The main motivation for a Python virtual machine in Rust is to strengthen
my knowledge with Rust which currently has some gnarly bits to it but
otherwise is an impressive low level language. Rust's future is looking
very bright as even Linus Torvalds agrees with most of its design choices
and is allowing it to be used as a linux kernel module language.

Skipping ahead to the subject of names, Rython was chosen because "Python"
is trademarked by the PSF so anything with the complete word Python in it
is out. A close runner up would have been Camelot but that is already
taken.

Going backward to the issue of use and audience. Making Rython a real
virtual machine that passes the CPython unit-tests is the only goal. I am
actively following the faster CPython fork that Mike Shannon, GVR, and
others are working on with the intention to try and incorporate what they
discover into my project but I don't think Rython will be dramatically
faster than Cpython because I am going to implement the same PyObject
reference counting garbage collector and unless faster CPython creates a
JIT component, Rython won't have one either. Additionally Ryhon won't have
the must have killer libraries like numpy so it's a moot point if my
project turns out to be dramatically faster.

To sum things up, I've been retired for over a decade so I have plenty of
free time. Initially I thought I might invest time into becoming a core
python developer but looking into it further, all I will say is that
doesn't feel like a very appealing use of my time.

Avi Gross

unread,
Jun 24, 2022, 12:24:23 PM6/24/22
to
David,
I understand now. As a project for your own edification I can understand it, albeit it is a more substantial effort than many people might choose, LOL!
So unless it starts being used heavily and adopted by some organization, the result of your effort will not necessarily be compatible with many modules now available or keep up with changes as python adds features or fixes bugs.
I am curious about why something like numpy could not be integrated into what you do. Of course, if you are the only user, ...
My hobbies to spend my time may not be as ambitious, but are quite a bit more varied! LOL!

Paul Rubin

unread,
Jun 24, 2022, 6:26:25 PM6/24/22
to
Avi Gross <avig...@verizon.net> writes:
> I studied Rust for a while and it has it's features but have had
> no opportunity to use it. Is it expected to make a faster version of
> Python, or enable better connections to libraries and so on?

I wouldn't expect it to be faster than the C version. The purpose of
Rust is to have a high performance (like C or C++) language, but with a
lot of compile time error checking, to prevent a lot of the runtime bugs
that have traditionally plagued C programs (pointer errors, etc.)

I'm also not sure of the benefit of reimplementing the Python VM in Rust
without also reimplementing the rest of Python. The best route to
higher runtime performance is probably a JIT compiler, i.e. PyPy.

It might be interesting to use Cranelift (a JIT compiler written in
Rust) for this. Maybe that is what David intends.

Other than that, Rust has good ideas that will be new to most of us, so
writing something in it sounds worthwhile for anyone.
0 new messages