Guido and Bruce Eckel Discuss Python 3000
Phoe6 writes "Leading author and programmer, Bruce Eckel, posted some of his concerns on Python 3000 stating that the Python community is failing to address some of the important issues with this major, backward incompatible release. Problems he mentions are concurrency support on multi-core CPUs, easy deployment support, and a standardized user interface, amongst others. He expresses his dissatisfaction at the post titled "Python 3K or Python 2.9?. Guido van Rossum addresses the concerns in a very pragmatic way with his response to Bruce Eckel and calls for more developers to contribute to Python to improve it further. Bruce Eckel concludes with his thoughts that he wants his favorite language to be better with his reply to Guido's reply."
I just don't see a reason for this conflict with Guido. Just make a new language, if you want something incompatible, but don't call it Python. Call it Anaconda or something. Or even Garter. Then you can do what you want. If you think you are better than Guido, then get typing, and prove it!
This is my sig.
First link should probably be to http://www.artima.com/forums/flat.jsp?forum=106&thread=214112 .
"Elmo knows where you live!" - The Simpsons
That's the one where the control structures are all invisible, right? I'll give it a miss, thanks all the same.
Only three things are certain; death, taxes, and apocryphal quotations - Ben Franklin.
Shouldn't Python 3000 include a giant animated foot and silhouettes of the audience cracking jokes?
Python, meet Haskell and Erlang.
Inventions have long since reached their limit, and I see no hope for further development.-- Frontinus, 1st cent. AD
I like Perl. Is there a tool that converts Python scripts to Perl, or compiles them into the opcodes that Perl's interpreter actually executes? That could let Python scripts run on lots of other machines, possibly avoiding all those architecture limitations that the Perl engine has already solved.
--
make install -not war
One thing I don't understand about Eckel's original article is that he says breaking compatibility isn't a big deal, because the programmers who don't want to use the new version will just stay with the old one. How does that work for the users? Do they (a) end up having to pick which version of the language to install on their machine, and lose the ability to run half the world's python software, (b) have to install multiple versions of python on their machine, or (c) ??? Eckel is comparing with Java, but since Java is a compiled language, it's much less of an issue; syntactical changes don't affect the end user who just wants to run the code. How would python handle this? Perl 6, for instance, will automatically detect if the code you're running is perl 5, and will run it correctly in a compatibility mode.
Find free books.
If they really want to help Python, build some online documentation that doesn't suck donkey balls. Seriously, I've never had more trouble learning a language than with Python. I have to go google it, because every site is missing info, so you have to put them all together. Does anyone know of a site with ALL the info, that lists ALL the methods in ALL the classes along with what those methods are expecting? Because I sure as hell could never find anything like that. Learn from PHP guys, the reason PHP took off so fast was because the php.net website kicks royal ass as far as documentation and you can learn it quickly. Just my 2 bits.
My main problem with python 3.0 is the loss of the print statement! I have pestered Guido about it (including booing his talk on python3000 at europython this year) and, he said "well i brought this up last year and nobody seemed to object" and then to me personally "well no other language has a print statement".. I think the dumb simplicity of python's print statement is one of my favourite python things. It makes the language friendly (and I am a pepper-print debugger). As Mr. Hettinger says "you can't break 'hello world!'".
I also think, more generally, that people are in for a world of pain, converting to python 3000. There needs to be tools that are %100 reliable that can convert code from 2.6->3.0. Otherwise, there will just be too much code mass, and it will take a long long time for 3.0 to be accepted. Such a stall is bad news for an OSS project.
Simon.
python codes you!
Usually such a big jump in version number is done in two steps. For example you'd go from 3.1 to 95, and then from 98 to 2000.
I love Python, but it's often just too slow! Based on the profiling I did, it is the interpreted nature of Python that is at fault. What I think would be great is if Python 3000 were to also include a native code compiler. Maybe it could be built off of GCC or LLVM to make the work go faster? In college I had to use OCaml, and it had both a bytecode and a native code compiler, and they were both well supported. OCaml is a lot like Python in many ways, so I think maybe it could be possible to do the same with Python. I would do it, but I just don't have the skills necessary. :( If I wasn't so busy as a nurse, I'd try to learn more about compiler design.
Why not just call it Python++? Oh, that's right, Python doesn't do that.
You gotta find first gear in your giant robot car
The python mathematics algorithms must have a bug if they're going from version 2.9 to version 3000.
... I have the following symlinks: /opt/jre13/bin/java /opt/jre14/bin/java /opt/jre15/bin/java /opt/jre16/bin/java
java13 =>
java14 =>
java15 =>
java16 =>
java => java16
Guess what - it is simply perfect.
To anyone else who was curious and potentially interested:
No, they're not fixing the syntactic whitespace problem.
Move along, nothing to see.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
Bruce complained that Python3K is not modular enough. Guido, always the pragmatist, and having just watched Reservoir Dogs, retorted that anyone who wants a modular language should get his head examined.
Some guy on the mailing list proposed a new and better syntax, but Guido declined to merge it; he explained that he doesn't trust the new guy as much as Bob, whose Context-Free Syntax (CFS) is going into the next development version (odd-numbered, of course).
Tsunami -- You can't bring a good wave down!
A lot of what Eckel is saying is basically "Python should be more like other languages" - not because they're better, but because I'm more used to them. Obviously that's totally ridiculous, yet not surprising: If you look at his resume, it seems he's far more familiar with other languages than Python. I seriously doubt his credential - let alone objectiveness - to question Python's design.
Guido is right that Bruce's comments are mostly not core language issues.
But that's also the problem the Python language is fine the way it is; it doesn't need any major overhaul. Before hacking away on P3K, Guido should concentrate on getting things like the UI, the standard libraries, and package management straightened out. Community contributions won't fix those; in fact, community contributions are the source of many of the problems of Python because often, there are multiple, mutually incompatible libraries and tools trying to do the same thing and stepping on each other.
Guido is doing what is fun (hacking the language) instead of what is needed (straightening out the libraries), and that's not the best choice for Python overall.
Some drink at the fountain of knowledge. Others just gargle.
The right answer is here: http://newlisp.org/
Actually, those aren't the real problems with Python. They're not the ones that keep it from, say, replacing Perl.
Multicore support is a nonissue. CPython is too slow to need it. It's helpful to distinguish between the Python language, which isn't bad, and the CPython implementation, which is a slow, naive intepreter. CPython is about 60x slower than C. Compare Java, which, with modern just-in-time compilers, is about 2-3x slower than C. What's needed is a Python compiler with some smarts. There's Shed Skin, but it doesn't work yet.
One side effect of the speed problem is a tendency to try to write C modules to do things that take significant time. Unfortunately, CPython's interface to C is terrible, bug-prone, and changes with each new release.
The "dynamic language" thing is overdone. CPython is a demonstration of the fact that if you make everything a dictionary, it's easy to implement a dynamic language. It's also a demonstration of "if the only tool you have is a hammer, everything looks like a nail". Too much time is wasted in Python checking to see if something changed that probably didn't change. You can add or change functions or data of a running object or a running function. From outside the object or functionor thread, even! It's cool! It's l33t! It means you can't have an optimizing compiler. (Well, maybe you could, with one that goes to immense lengths to detect when "something funny" is going on and reworks the code on the fly. Won't be easy to implement.) Those features just don't get used that much, except to patch around bugs in the buggy Python libraries. The troubles with the "global interpreter lock" stem from this problem. The "global interpreter lock" is mostly protecting all those dictionaries which define the program. After all, one thread might want to patch the code in another thread.
Years ago, LISP hackers used to talk about how great it was that LISP programs could modify themselves while they were running. Few useful programs ever actually did so. Java has a certain amount of dynamism; you can, if you really have to, create Java code from within a program, compile it, and load it. Few programs need more dynamism than that. The Shed Skin implementation imposes some restrictions on dynamism, and they're on the right track.
Libraries are someone else's problem. Python is better than Perl as a language, but CPAN is better than Python's Cheese Shop. Many key modules aren't part of the main Python distribution and aren't synchronized with it. Examples are the interfaces to databases like MySQL and the interface to SSL. These lag months or years behind the base system. Modules outside the small "core" are not supported in any coherent way. Each is supported by a developer or two, working in isolation. If they lose interest, the module languishes, and nobody else can change it. This sometimes leads to multiple libraries for the same purpose, each with different bugs, and none good enough to obsolete the others.
The overall effect is that if you try to write something complicated in Python, everything goes along just great until you hit some library bug that can't easily be fixed. Or you discover that you need racks of servers to compensate for the painfully slow implementation.
That's why Python hasn't even replaced Perl, over fifteen years into the deployment of Python.
Guido is doing what is fun (hacking the language) instead of what is needed (straightening out the libraries), and that's not the best choice for Python overall.
That says, in one line, what I wrote in a much longer post.
For python to be healthy in the future, it needs to cut out all the added syntactic sugar bloating the syntax since 2.2 and substitute it with complex XML support.
Ergonomica Auctorita Illico!
As long as they are going to break things here's my wish list for python. Make it possible for a compiler to compile it. Yes I realize that's essentially impossible for a dynamic language that does not enforce types in the function prototypes.
However, it could be done like this. First recognize that nearly all uses of python do not take any advantage of the dynamic typing, and nearly all calls to functions happen with arguments whose type is not varying. Thus why not have a mechanism, an optional one, that could hint at the expected typing for a function and its args. I realize there are ways with "decorators" to add type checking, but that's not the point. I'm talking about type hinting. The reason for this would be to allow a compiler to examine the code, read the hints, and then compile the code or translate it to C++.
The problem with existing python accelerators is that they bend overbackwards to avoid stepping on the dynamic typing. Why not allow the user to forego that if they want to and have static typing if they want to go to the effort of indicating it.
Some drink at the fountain of knowledge. Others just gargle.
Regarding the GUI: don't.
This is a language, so keep it as such. I realize it's hard to market a language without a rich set of standardized libraries, but the UI should be an exception. This is an area where the technology is slowly but constantly changing. In addition, GUIs tend to have somewhat "religious" supporters. Also, as Bruce mentioned, all of the toolkits have their advantages and disadvantages. One "disadvantage" they all share is a changing API. Nothing stays the same forever. Tying your language standard to a third party API is problematic.
One language tried to do this (Java), but it's original GUI was universally reviled, and it's current "official" GUI (Swing) is competing with an extremely popular third party solution (SWT), and another third party solution (Jambi) is starting to gain enthusiastic users.
So in my opinion, leave the UI unstandardized.
Don't blame me, I didn't vote for either of them!
He's not that different from Linus. He does things in ways that some people seem to really dislike. When they complain, he doesn't mind. "Tough cookies." I guess when Linus does it, it's a noble independent spirit, when Guido does it he's being an asshole.
I use Python as a test, actually. Hating the language is okay by me, we've all got tastes. Lucky for you, we don't write our code in Python so you won't suffer. But saying you hate it because of enforced whitespace? That fails your interview, right there. Ohhhh boy. You've got a problem with having to make things line up the way their supposed to? Just wait until you hit some actual PROJECT REQUIREMENTS.
He said that 'self == whitespace indentation' whereas for me I see that as exactly the oposite:
- using whitespace for indention remove 'visual noise' at the cost of 'language magic'
- using self adds 'visual noise' with the (dubious IMHO) benefit of language 'simplicity'.
IMHO removing self would be a big plus for Python, sure self makes things more explicit but if developers really wanted to use explicit language, they would stay with C instead of using Python, Ruby..
While python org has documentation, python documentation lacks three critical aspects.
1) searching and finding only relevant results. When I don't know exactly what I'm looking for, say how to parse an input string to numerical variables, and try to search python.org I get all kinds of crap at the top of my search. Discussions, posts, Peps, and deprecated crap. There ought to be a way to search for things relevant to the current python commands.
2) documetnation that teaches. Too often when I find the documentation of a method it's just a terse self-referential explanation and a list of args. No understanding is returned. If you want to see doucmentation that explains how to use a function look at Perl's man pages. There commands are explained.
3) local documentation. Again I point to perl's man pages as the right balance between compactness, richness, and completeness.
Some drink at the fountain of knowledge. Others just gargle.
The Python Software Foundation (PSF) needs to realize that there's so much more to a language than the syntax. There needs to be a major effort in making it easier to install, get started with, and deploy Python, and much more advocating and marketing needs to be done. For example, PSF should start campaigning so that web hosting providers support Python out of the box. Why do you think PHP, despite it's obvious drawbacks, is so popular? Because it's ubiquitously supported and requires nil efforts to get started!
It's great that Python is constantly evolving into a cleaner and more competent language, but I fear that the Python 3000 efforts could result in a pyrrhic victory in the war between programming languages because it simply fails to attract enough new people. There's so much that the PSF could do, but there seems to be too much "But that's not our job!"-thinking.
I'm even more perplexed why Guido is removing the "+" sign. HE says he's reserving it for an unnamed future use. In the mean time using two minus signs in a row is how all additions will be done in python 3000. I'm baffled by this.
Give me multiply indexed arrays and array slicing! that would be something.
We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
{
:-)
Yeah,+I+just+hate+it+when+those+folks+think+that+white+on+white+can+be+readable;
}
{
Or+that+positioning+text+properly+is+the+correct+way+to+make+it+parsable+by+humans;
}
Oh wait, this piece of text is a bit more readable.
Isn't it?
Well if one of the incompatibilities is getting rid of the goddamn significant whitespace I'm all behind it. It might even encourage me to give the language a chance. If it weren't for Civ IV I would have never used it for anything. A good slashdot poll would be how many people haven't even bothered with the language because of "the whitespace thing".
I understand that it is inevitable for the same old flamewars to start on slashdot.
But must we give modpoints to idiots?
Bruce Eckel is looking for Erlang. That's not what Python is for.
StoneCypher is Full of BS
I meant sys and os, sorry about that.
Send email from the afterlife! Write your e-will at Dead Man's Switch.
Sounds like some tough issues. Good thing they have 993 years to get it right.
And learn LISP.
Deleted
Using self, or something like it, is a requirement for having a dynamic class-based OOP system. C++ can get away with avoiding it most of the time by requiring variable declarations. Python will and should never do that. Ruby uses at-signs which have much of the same purpose as self in Python.
Please, for the good of Humanity, vote Obama.
CPAN is better than Python's Cheese Shop.
And the Java API + 3rd party libs knock them all into a cocked hat.
you had me at #!
For a really great and thought provoking talk about concurrency watch this Techtalk about Newsqueak given by Rob Pike of Plan9 fame.
:) No, really.
Build channels as first-class citizens into Python.
Meme of the day: I browse "Disable Sigs: Checked". So should you.
Think about why you got modded that way.
There are good reasons for the whitespace thing, actually. If that's your biggest complaint, hell, my biggest complaint about other languages is that I'm forced to use these silly brackets when I'm already indenting anyway.
Don't thank God, thank a doctor!
This language lacks a standard. There is no ISO specification. There is one working implementation, and a few half-done clones that are "broken" because they aren't identical to the primary implementation. Now they talk about incompatible changes!!!
That's less standard than Microsoft OOXML.
I can't take this language seriously, and I'm certainly not going to rely on it for anything that has to last through the years or be deployed out in the wild.
I can rely on C. It was standardized by ANSI in 1989, by the ISO around 1992, and again by the ISO in 1999. There wasn't any crap like "remove puts because people can just use printf", but this is exactly what we see with Python.
I can rely on the Bourne shell, also standardized by the ISO. (joint effort by the Open Group and IEEE) I can sort of rely on C++ and Pascal. I can rely on Ada, FORTRAN, and even COBOL.
The first link points to the same page as the second link. It should point to this
Ok, this is Slashdot, no one clicks those links anyway.
I agree, if they have that different of a goal, just fork and call it something else. Many will stay with Guido's Python, others will migrate to the new langauge.
Problem solved and no one needs to get killed in the process.
---- Booth was a patriot ----
Syntactic whitespace makes it harder to automatically reindent code
...
This is a nonsensical statement. The only reasons to "reindent" code are because you're doing something like a refactoring that added/removed a level of scope. But in that case, Python removes the need for this entirely. Instead of "Add {, add }, select region, reindent", it's simply "select region, push right" (or left).
I've programmed Python for years, and I still can't figure out why anybody would need to "reindent" Python. It comes correctly indented! You may as well complain that it's hard to automatically add {}'s in C.
makes it easier to accidentally break the code structure
I don't know what you mean here, either, unless you go around randomly adding whitespace for fun.
If anyone is interested, my top candidates for improvement or python would be:
All of these things are in Javascript. If you want Javascript, you know where to find it. Go for it. Nobody's stopping you. I hear it's a pretty nice language. It's not Python, but most languages aren't.
Glad to see Guido still takes both of these issues lightly. I've been using Python every day since 1995 and I can attest that these are still huge problems.
Take the error reporting. Both whitespace and "self" create really confusing errors for new, and old, users.
* "takes exactly 1 argument, got 2" -- this is what you get for a missing "self". Few python users can figure this out without help or turning to example code.
* Oops, someone edited a file and used tabs... indentation can be reported as a syntax error or indentation error. It depends.
On whitespace for a moment, the argument for whitespace is that it makes cleaner code. It does. The catch is that whitespace then needs to be policed forever on your project. You can actually end up with INCORRECT CODE because someone put in a line with a tab instead of spaces. Yeah, unit tests, code review, blah blah blah. Whatever. NO other language, interpreted or otherwise, requires this amount of added overhead to make sure code is nested properly (except for Python derivatives like Boo).
Am I complaining? No. I'm just pointing these out for non-Python users. The time for arguing these points is long past, if I really hated them I wouldn't use Python.
So I'm not sure why Bruce Eckel is even bringing some of this stuff up -- Guido has never changed his mind on these and never will. Eckel hints at it, but I will say it. I suspect Ruby will have more success and introduce more people to dynamic languages than Python ever did, and NOT because Ruby's "better". It's because Ruby doesn't have ridiculous idiosyncrasies that the original programmer isn't willing to change. Matz seems to have an open mind about improving Ruby. And there really is decent VM with Ruby 2, and the Rails hype keeps Ruby in the mainstream, that language might go beyond where Python, Perl and maybe even PHP are today.
And as far as another commenter said about coding our own version of Python... what's the point when Ruby's sitting right there and fits most of the bill?
It seems to me that most general purpose programming languages would do best if they did exactly three things in relation to their standard library:
The art, of course, is in defining the right frameworks for each area. This is not easy. In fact, it's very hard, perhaps the single hardest thing about developing a good new platform for programming. However, as demonstrated by the C and C++ worlds where standard libraries are minimalist but there are several popular cross-platform libraries used in practice, it can usually be done. And if you can do it, and produce good frameworks that are both clean enough to use for most things as they stand and extensible in useful ways where platform-specific features or future developments warrant, then you're backing a winner for sure.
The language itself should then, IMHO, provide solid support for library users and developers in terms of clear interfaces and facilities for whatever version checking, dynamic loading, calling conventions, data marshalling, documentation or other common aspects make sense for that language.
This combination basically keeps the overhead for learning and portability low, which is the major advantage of having a standard library in the first place, but without committing to writing and maintaining a large standard library from day one. The latter, IME, usually means having to live eternally with the mistakes when the implementation that was driving the library turns out not to be flexible enough a few years down the line; this has happened to most monolithic standard libraries in mainstream programming languages so far.
If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
Ok,
Python is slower than C, C++ and Java... Guess what? So are PHP, Ruby, Perl, and every other interpreted language.
However, if it takes me 10 programmer hours to create a python program (or PHP, Ruby, Perl) program, and the program takes 10 seconds to process 50,000 records from my database while the C version of this program takes 500 programmer hours and takes 1 second to process 50,000 records.... how long does it take before the C program is faster?
about 9.8 billion records... well, at our current rate of record growth, I'll be there in about year 2500, even assuming 50% growth/yr (completely unsustainable for any enterprise past 10 years) its still 2100 before the time saved by the program equals the time saved on programming time... Not to mention CPU time costs less than 1 cent/hr, and programmers are much more expensive.
And for the record, we have done this. We recently re-wrote a C application in python, the original application took 5 programmers 3 years to create, we recreated it in python with 2 programmers in 6 months, it is feature complete vs the C implementation, it is slower, but not outside of what would be considered reasonable. We also haven't even tried to optimize it at all... which we could do and probably at least get 10-20% improvements in performance.
Now, in saying this am I saying interpreted languages are the answer to every problem? No! Sometimes, you need C, sometimes there are problems that can't be solved well in any specific language. If there was a be all end all language, we'd all be using it. Python, Perl, PHP, and Ruby all have their place, in general I prefer Python because I find it much more intuitive than Perl, I find generally better programmers advertising Python jobs than advertising PHP jobs, and I just like it better than Ruby
I know about this. And I know about ponie.
And I still haven't heard of anything approaching a release candidate for perl6, or ponie, or pynie. Maybe I just haven't been paying attention...
Another question is whether pynie has a chance of becoming the default Python environment. There's been Jython and IronPython, and probably others, but they suffer from lacking some features and generally being less popular than CPython. I imagine most people would agree that a standard VM is probably a good thing.
Don't thank God, thank a doctor!
... implementations are slow/fast. A language based on a specification can have multiple implementations with vastly different performance characteristics. Consider Common Lisp, which has implementations:
* with a classic interpreter, and dynamic native compliation (Allegro CL)
* with a byte-code compiler (CLISP)
* with dynamic native compilation only (SBCL, OpenMCL)
The reason "Python is slow" is that it is defined by an interpreter-based implementation - other implementations with different performance curves are judged on bug-for-bug compatibility with CPython.
To a Lisp hacker, XML is S-expressions in drag.
I may be your exception...
I've spent the last while wrestling with a short Python/Scapy app that monitors network activity and writes data to Oracle. Got it working fine as a MySQL app, then did a *lot* of swearing at the half-baked nature of various oracle interfaces before I finally got cx_oracle to work. My one unresolved concern after all this was a worry about performance: during high-traffic bursts, scapy drops packets.
Then I was asked to redeploy from a 32-bit to a 64-bit multi-core box. The result has been hairy enough that I'm about to break your rule and shift to something else (perl or c). cx_oracle depends on the oracle client, one of which is precompiled 32-bit only; the errors I get are cryptic and useless, and documentation is sorely lacking. And when I'm done, I'll probably still see performance problems, based on the rants I'm seeing here about python not using the other CPUs.
Given the rather substantial amount of data being shoved into Oracle databases worldwide, Python devs ought to be a bit embarrassed. But Larry Ellison and Oracle ought to be shot: they're running a commercial entity and they can't find time to document a clean/light connection and API to their database from Python!? Sheesh.
Syntactic whitespace reminds me of the rules of "Haiku", the Japanese poetry style.
http://en.wikipedia.org/wiki/Haiku
Aficionados of Haiku say they like it because it frees them to concentrate on meaning rather than form. The form is specified.
Personally, I like the syntactic whitespace for these same reasons.
So much time has been wasted debating coding styles that I am happy to have it pre-specified and dealt with.
We can then move on to more important issues of content.
It's a while since I used vi, but a tab and a set of six spaces both show up in WordPad - and they both look the fucking same. Ditto if I print the file. And if you tell me I should be using an IDE that pretty much proves my point - if a language needs anything more than a text editor to write it, then it has serious failings.
Only three things are certain; death, taxes, and apocryphal quotations - Ben Franklin.