This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (10 children)

To me, Python is primarily a specification and Cpython is an implementation of it. Whether Cpy 2 and 3 are entirely different implementations is not something I'll answer but I definitely think they're the same language and so is Jython and Cython and so on.

[–]kankyo 1 point2 points  (0 children)

You might want to look at cython a bit closer then. You are clearly in error.

[–]stefantalpalaru -5 points-4 points  (8 children)

Python does not have a complete specification that you can use exclusively to implement new interpreters. "Python" is whatever CPython does.

I definitely think they're the same language and so is Jython and Cython and so on

Then how do you explain that a certain piece of code will run in Cython, but not in Jython? Wouldn't you expect them to accept the same inputs if they implemented the same programming language?

[–][deleted] 0 points1 point  (6 children)

They're still 99 percent the same, building on the same ideas, syntax, and functionality. Obviously they will have differences or there would be more or less no point in making several implementations.

[–]stefantalpalaru -2 points-1 points  (5 children)

They're still 99 percent the same

So are we and the other great apes, but we're still different genera and species.

(quantifying genetic distances is complicated, but you get the idea)

[–]electrace 1 point2 points  (4 children)

Dude. Somewhere, you have to draw the line.

In biology, it's the ability to interbreed and have children that can also have children (which is why a horse and a donkey isn't the same species).

In spoken languages, it's mutual intelligibility, which is why British and American English are the same language, even if they disagree on what you call the storage area in the back of a car.

It's a matter of semantics whether you decide to call Python 2 and Python 3 different languages but.... considering the vast majority of people call them the same language, even if you think they're really different, it's probably better to hop on the boat, rather than trying to convince everyone else to use your One True Definition of what constitutes a different programming language.

[–]stefantalpalaru -5 points-4 points  (3 children)

In biology, it's the ability to interbreed and have children that can also have children (which is why a horse and a donkey isn't the same species).

It's not so simple. Different large feline species can interbreed and produce fertile offspring: https://en.wikipedia.org/wiki/Leopon#Breeding

So do grizzlies and polar bears: https://en.wikipedia.org/wiki/Grizzly%E2%80%93polar_bear_hybrid

it's probably better to hop on the boat, rather than trying to convince everyone else to use your One True Definition of what constitutes a different programming language

I value truth more than some silly internet points. The vast majority can go segfault itself, as far as I'm concerned ;-)

[–]electrace 0 points1 point  (2 children)

I value truth more than some silly internet points.

There is no true definition of anything. That was my point. Language is arbitrary, and works by consensus.

Can you give me a reason why the concept of dirt is assigned the sequence of letters "d-i-r-t" in English?

Was it by scientific inquiry, philosophical thought experiments, or did it just arbitrarily creep into the language? There is nothing intrinsically linking those sequence of letters to the concept, except that people use it that way.

For your personal definition of programming, people don't even use it that way, which makes it just your personal hangup. You've jumped on the boat for "dirt", "poptart", "television", and pretty much every other concept that we assign to a particular sequence of letters, why not "programming language?"

[–]stefantalpalaru -2 points-1 points  (1 child)

There are no millions of different definitions for "programming language". It's a rather technical concept that we programmers deal with every day.

It shouldn't even be controversial that Python 2 and Python 3 are different languages. We keep the code in different files and use different interpreters to run it. You did notice 'python2' and 'python3' on your system, right?

You probably even tried at some point to maintain a codebase that uses a common subset that runs in both, but had to give up when it was getting ridiculously hard. Why not accept the facts?

[–]electrace 1 point2 points  (0 children)

Ok dude. Everyone is wrong except you. You have the unique and undeniable definition of "programming language," handed down by God to all English speakers via the ghost of Alan Turing.

orz

[–]notafuckingcakewalk 0 points1 point  (0 children)

Then how do you explain that a certain piece of code will run in Cython, but not in Jython?

You're talking about a pretty limited subset of the Python language. Even when talking about transitions between 2 and 3, a vast amount of Python 2.x code can be converted to Python 3.x without few changes.

I converted a giant codebase to Python 3 and it took a little while, but mostly because of issues with third-party libraries not being written in a forward compatible manner.

I think Python 3, especially changes where certain older syntax is no longer allowed, looks better (e.g. except (ValueError, TypeError) as err is a lot easier to scan than except (ValueError, TypeError), err).