Python 3.x adoption

D

Dennis Lee Bieber

Not mentioned in the wiki article is the change in calling convention
from call by value to call by reference (or maybe the opposite). I
remember a program crashing because of this when I tried it with F77.
Maybe because there was NO change in calling convention. FORTRAN was
call by reference in all versions I've worked with. DEC did add special
"functions" to force a parameter to be passed as "value", "reference", or
"descriptor" -- mostly to interface with other languages (descriptor is
what was used for character strings -- basically a structure containing the
length of the string/buffer, and the address of said buffer).

However, one may have encountered an implementation that did some
checking for duplicated parameter addresses -- or may have behaved
internally as a value/return system, wherein the by-reference parameters
were copied to local/stack storage, manipulated, and only written back to
the reference address on exit. That would result in differences:

a = 1
call xyz(a, b, a)

subroutine xyz(x, y, z)

x = x + 1
z = z * 2

....
In a true by-reference system, "a" would turn into 2 for the first
assignment, but then turn into 4 after the second.

In value/return, the second assignment still sees "1" and results in
"2", and thereby "a" becomes "2", not "4"...

I'd still consider a value/return scheme to be a misbehaving FORTRAN.
 
R

Roy Smith

Grant Edwards said:
And my touch typing accuracy/speed drops pretty noticably when I have
to use the top row of keys...

This is why shells have the ability to create aliases, and also why
command-line autocomplete was invented :)
 
B

beliavsky

On 1/17/2014 5:16 PM, (e-mail address removed) wrote:




As stated above, I disagree with respect to pre-F77 and F77. Did you

actually program in both, as I did?

I should have written "F77 and post F77". I have programmed in Fortran 77, 90, and 95.
 
T

Travis Griggs

Looks like the 2/3 topic has lain fallow for a couple of days, gotta keep it burning…

I’m a relatively recent python convert, but been coding and talking to others about coding for many moons on this big blue orb. I think the industrial side of this debate has been talked up quite a bit. We have tools, we have the wall of shame/superpowers for libraries and projects.

I think the desires of the core of people moving python forward are pretty clear to those of us that plug in. Move to 3. Period. We can debate, hate it, go on all day, but they’ve been pretty steady.

I’ve had a bunch of interns around me lately though, wanting to get into python, and this is where I find the momentum really breaks down. If newcomers go to take an online course in python, they might try MIT’sOpen Courseware (who doesn’t want to learn from the illustrious MIT after all?). They’ll be taught Python 2, not 3. Or they might try Code Academy. Again, they’ll be taught 2, not 3. If the newbie googles “python reference”… top link will be python 2.

So in my mind, the wall of superpowers/shame is no longer well aligned with where the real battlefront of adoption is at. The legacy of the internet caches and education sites are. Personally, I have no idea why an education site would favor a version that sooner or later they’re going to have to try and explain how super() works.

The other area, I think, that puts a dent in perceived adoption is in alternate interpreters. Back in the day, everyone was making some branch of python (e.g. IronPython, Jython, Cython, PyPy, Stackless, etc). All of them did python 2. Very few are doing python 3. Some have been abandoned (as is the nature of research endeavors like these were), but there doesn’t seem to be the broad swath of people still building alternate python expressions, especially in python 3. Being a fan of JIT, I have big hopes for PyPy, I can’t figure out why they aren’t pitching their “cutting edge” interpreter, for the “cutting edge” version of python. There should be a wall of superpowers/shame for interpreters.
 
C

Chris Angelico

I’ve had a bunch of interns around me lately though, wanting to get into python, and this is where I find the momentum really breaks down. If newcomers go to take an online course in python, they might try MIT’s Open Courseware (who doesn’t want to learn from the illustrious MIT after all?). They’ll be taught Python 2, not 3.

Courses are inherently laggy. I don't know how long it takes to write
a course, get it approved, and then advertise it so you get some
students, but I suspect it's a good while. I'd say that it's only
since 3.3 (some would argue 3.2, others 3.4) that Py3 has been the
clear winner in the new-application debate; give it a few more years
before courses start teaching Py3. Of course, anyone who comes to a
rapid communication venue like python-list can learn the state of the
art (in the original sense), but if you want a degree in Comp Sci and
you have to take X courses to get it, chances are you'll learn Py2
along the way.

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,206
Latest member
Zenden

Latest Threads

Top