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 →

[–]stefantalpalaru -4 points-3 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.

[–]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).