Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Python 3.0 makes a big break (linux.com)
20 points by soundsop on Oct 15, 2008 | hide | past | favorite | 17 comments


Even though I'm a Python veteran, I see 3.0 as being a big boon for newcomers. Even though Python is pretty popular now, removing any barriers to adoption would only help it more, and one of the best ways to do this is to adopt non-programmers. The fixed design flaws make the language more "pure", which in the eyes of a beginner mean there are less gotchas that make no sense, such as 1/2 = 0. It's a 'very high level language' so it needs to start acting like one.

One of the links in the story sums this up in a much better way than I could do in a comment: http://www.comp.leeds.ac.uk/nde/papers/teachpy3.html


Yeah, like there's thousands of people holding off using Python because print is a keyword and not a function.


The less inconsistencies in a programming language, the easier it is to teach.


I agree. If I was designing a programming language, then appending to the end of a file, appending to the end of a string, and writing to stdout would all look the same.

Actually, I am designing a programming language, and they look like this:

  fileHandle << data;
  aString << data;
  out << data;


I'm interested to see how the distro's manage this. Ubuntu seems to always have the latest and greatest, but I can't see them upgrading to Py3k any time soon. There's just still too much that relies on 2.x.

GvR said that new stuff should be built on py3k, but I'm betting it will be quite some time before anyone develops anything of significance on it. At work, even though we're in the early stages of developing our product, we're still sticking with 2.5 for the foreseeable future.

I imagine the adoption rate for Py3k will be worse than PHP5.


The comparison to PHP5 is definitely interesting. PHP5 was released around 2004 with significant upgrades to the language with a high degree of backwards-compatibility and it still hasn't reached complete adoption. Only now with official support coming to an end and more web host support, will it become the standard.

The adoption of Python 3 will likely differ, since Python is not a standard feature of low-cost web hosts and has a wide range of uses outside of web development. It should be interesting to see how this plays out.


I think that PHP 5 relatively brought so much more to the table, and there's the security factor of keeping your PHP up to date.


Py3k offers almost no immediate advantages compared to Python 2.x -> that slows down an adaptation rate -> long term advantages are eaten by a burden of supporting two incompatible language versions -> by the time Python 3.0 gains sufficient momentum it will be already obsolete.

The Zen of Python is violated: practicality is bitten by purity.


Breaking compatibility is easier now than it will be in the future. In ESR's "The Art of Unix Programming," Stuart Feldman explains his decision to use tabs in make:

Why the tab in column 1? Yacc was new, Lex was brand new. I hadn't tried either, so I figured this would be a good excuse to learn. After getting myself snarled up with my first stab at Lex, I just did something simple with the pattern newline-tab. It worked, it stayed. And then a few weeks later I had a user population of about a dozen, most of them friends, and I didn't want to screw up my embedded base. The rest, sadly, is history.

Beware the argument that life will be harder tomorrow, or even for the next year. Sometimes that's better than living with your mistakes for 30 years.


It seems bad but most of the changes can be taken care of using the 2to3 tool written GvR. The changes are really not that bad and quite a few of them are very long overdue.


Which sizable codebase have you migrated using 2to3?


Indeed it will break every existing non-trivial Python program.

I hope someone big and important like Ubuntu or Red Hat does a fork for compatibility (they could call the fork "Real Python", and start version numbers at 4.0). Oh well, at least it gives me an incentive to learn Ruby.


2.6 is for backwards compat, with as many of the 3.0 features as they could do without breaking changes. And frankly other then the whole GIL thing Python has been moving in a pretty solid direction all these years, so eh.


I attended a Python3000 talk by Anthony Baxter last month (Anthony is the release manager for Python).

He mentioned that Python 2.x is will be supported for a very long time. They definitely expect to have 2.7 and may be even 2.8. They are also going to backport important features and security fixes from 3.x

Google has a very large codebase written in Python 2.x, it's in their interest to support the language for as long as needed.


I didn't get a chance to attend the OSCON talk by Anthony Baxter but I saved the link to the PDF.

http://www.interlink.com.au/anthony/tech/talks/OSCON2008/por...


That's the talk, although I watched the SyPy version of it.


>He mentioned that Python 2.x is will be supported for a very long time.

I know of shops that still use 1.5/1.6...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: