Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Mark Lutz on Python 108

Betsy Waliszewski sent in this interview with Mark Lutz, author of Programming Python. He discusses the evolution of Python during its brief history, XML support and .NET, and takes a brief look at the future of Python.
This discussion has been archived. No new comments can be posted.

Mark Lutz on Python

Comments Filter:
  • by Anonymous Coward
    Python is very powerful - it's killer app is Zope [zope.org]. Zope Makes PHP, Mod Perl and just about every commercial application server out there look *very* lame.
  • by Anonymous Coward
    I like to think of python as toilet paper -- I mean this in a good way, mind!

    After all, where would we be without toilet paper? Such a world scarcely bears thinking about. Yet for a great many years (up into the industrial age) it simply hadn't been invented.

    The march of technology is gradual, and the uses of a product are not always immediately evident. Paper itself had been invented centuries earlier by the Chinese, yet it wasn't until the time of the great Thomas Crapper that it could reach its full utilisation. Use of paper in an old-fashioned privy would have been disgusting and ridiculous. But in a water-based toilet, it is heaven on earth.

    Python is in much the same position. It is truly a splendid language, with features (e.g., whitespace formatting and garbage collection) that have been maligned in the past, and with good reason I might add. But hardware capabilities have moved on, and these are no longer liabilities, but features. Python is elegant, simple, safe, and above all it gets the job done. Previous tools could do the same work, but not nearly so comfortably.

    (And where does perl fit in to this analogy, perhaps you ask? Well, you see, the Japanese used to have use a thing called "the toilet stick"...)
  • by Anonymous Coward
    $ python
    >>> import Queue
    >>> q = Queue.Queue()
    >>> item1 = ["this","is","a","list"]
    >>> item2 = "now a string"
    >>> item3 = 3
    >>> q.put(item2)
    >>> q.put(item3)
    >>> q.put(item1)
    >>> q.get()
    'now a string'
    >>> q.get()
    3
    >>> q.get()
    ['this', 'is', 'a', 'list']
    >>> q.qsize()
    0
  • by Anonymous Coward
    Nope, programming in Python is FUN. Programming in perl is torture. I *hate* producing read-only code. I *hate* working in big languages. I like taking small systems and building big things with them. Perl's syntax is just too awful.

    Python is fun because you can write very useful, complex, and READABLE programs very quickly. The startup curve with Python is extremely small compared to other languages, which is great.

    A professional programmer cares about the quality of his/her code and the people who come later who have to maintain it. Code which isn't maintainable might as well not have been written.

  • by Anonymous Coward
    When I think of a cleaner Perl alternative, my thoughts switch to Ruby (not Python) as well. The main reason Ruby hasn't taken off is that all of the docs were, until the last couple of years, written in Japanese.
    Now that there is a good english Ruby book and apparently another on the way from O'Reilly that's changing.
    BTW: In Japan, Ruby has taken off.
  • "C'mon, they're using MySQL. Were you really expecting there not to be massive data loss?
  • by Anonymous Coward
    Or even easier:

    mystack = ['blaad', 'test', 'new']

    # pop
    poppedvalue = mystack.pop()

    # push
    mystack.append('new element')

  • by Anonymous Coward on Thursday May 10, 2001 @07:19PM (#231157)
    is the #1 reason python has not completely replaced other scripting languages as the preferred choice. His books are awful. I can only conclude that Mark wrote these books because he is secretly a perl zealot. He felt threatened by python and decided to write books to impede the collective python learning process. For now, stick with the docs at http://www.python.org
  • Troll or not, I think there's an important point here. People's impression (and use) of a language is *hugely* influenced by the tutorials they use.

    I think that most people's impression that Perl's OOP features are a bit convoluted comes from their slightly tacked-on explanation (in terms of previous Perl features) in the Camel books. Given that most approaches to large-scale projects revolve around OOP these days, that leads
    to people using the wrong techniques with Perl, and getting unmanageable stacks of steaming subs.

    Damian Conway's Object-Oriented Perl [manning.com], on the other hand, is so good that it won me back to Perl from Python. Conway's explanations show you the subset of "ways to do it" that include "ways that scale".

    It was a bit of a relief, to be honest, because while programming Python felt very worthy and clean, it was not fun. I wonder how much that had to do with how I learnt it too?

  • In all truthfullness, you shouldn't: Java is faster than Python, and servlets kick ass.
    Java probably is faster than Python, but that should seldom make a difference. Add a few processors, whatever. The database is where you should be doing most of the heavy lifting anyway.

    Webware [sourceforge.net] gives you servlets in Python. I would recommend it -- Zope isn't by any means the only way to use Python on the web (thankfully).

    I've never used Java servlets, but I've read a few bits of sample servlets. They seem to me to be painfully verbose. I'm all for long variable names and all that jazz, but Java just seems to make you jump through hoops for no good reason. It's not just that it isn't fun, or requires lots of typing, but verbosity makes for a bad language. You should be able to say things as you mean them, verbosity obscures that.

    However, Java may not be so bad on a larger scale. Perhaps the example code doesn't want to build even a small library (since its just an example) and in a real project you'd do that and simplify things.

    Another thing I like about Python is the extremely dynamic nature. You can have a dynamic inheritance tree, for instance -- consider an entire framework where you could subclass major components and those subclasses can easily insinuate themselves into the depths of the framework. This allows you to make radical changes to the framework without compromising the distinction between your local code and the upstream code. To do this requires that classes be first-class objects, so you just can't do it in Java.

  • I think it is mostly due to issues of deployment. Python's biggest gain has been that it is now pretty ubiquitous on modern Unix installations. It's also pretty easy to install on Windows. Most Unix web hosts have it installed. Etc.

    This hasn't and isn't going to happen for Smalltalk. There's no clean, well-partitioned way to install a Smalltalk runtime. It's overintegrated and overly insular. So it can't come in slowly, with small programs and utilities being written in Smalltalk.

  • I took a class in software design where Squeak was used, so I think I can answer this. Smalltalk is horrible.

    Previous posters have already mentioned the "wall" between the environment and the host system, and while I can understand the reasoning behind it, it is dated reasoning.

    The bigger issue I have with Smalltalk (or perhaps just with Squeak) is that there is no syntax. Everything is an object, including such tradition keyglyphs as '='. That's swell, except that it means syntax is defined wholly by the object in question. Various classes had their own ideas of how they wanted their parameters arranged when they were instantiated or their methods called. It was horribly inconsistent. I spent more time reading "library" code in that language than I have in any other, and I remember almost none of it because it was so often conflicting.

    It was a cute idea... pure OOP from the ground up. But it sure did turn into a nightmare.

  • I wrote a brief review of Programming Python (1st edition) [dannyreviews.com]. A nice book.

    Danny.

  • My question is, is there any kind of plan to do the same kind of thing for Objective C and the Cocoa (NextStep) and/or GNUStep APIs? If not, would it be feasable, or maybe even productive, to do so as a third party hack?

    Check out the Python - Objective-C bridge [sourceforge.net] project at Sourceforge. It appears to be coming along slowly. In the mailing list archives you'll also find discussion of using Jython with Apple's Java bridge as well.

  • to his weighting and Python suddenly comes out near the top. And thats without trying, just dropping some ones in the LOC & memory boxes.

    seriously, use what works best.

    Chris Cothrun
    Curator of Chaos

  • by Jonathan ( 5011 ) on Thursday May 10, 2001 @07:03PM (#231165) Homepage
    Well, Python is in an awkward position right now -- it isn't the newest and coolest scripting language anymore -- that's Ruby these days, and at the same time it isn't the standard scripting language (which is still Perl). Without the coolness factor it had in the mid '90s, Python's hope for growth lies in people hired to maintain code written by the first generation Python hackers, and this means slow (if steady) growth.
  • for no other reason that when I'm 5 levels deep and want to write something like someProperlyAndDescriptivelyNamedVariable = somObjectWithAnotherLongAndDescriptiveName.aMethod WithSimilarlyLongAndDescriptiveName(someObviouslyN amedParameters,someOtherObject.someOtherMethod()); it's running off the side of a normal xterm real quick

    You know that Python lets you put parens around an expression, and then have the expression span multiple lines, right? eg:

    someProperlyAndDescriptivelyNamedVariable = (
    somObjectWithAnotherLongAndDescriptiveName.aMethod WithSimilarlyLongAndDescriptiveName(
    someObviouslyNamedParameters,
    someOtherObject.someOtherMethod()
    )
    )


    By the way, the trailing semicolon is unnecessary.
  • So you've got your editor configured incorrectly. Set your tab width to 8. Then you'll be seeing what Python's seeing.
  • Python has taken off. Yes, less people use Python than use Perl. But less people use Linux than Windows. The difference is between the people in the know, and the unwashed masses... :-)
  • The whitespace thing is pretty easy to deal with; simply be consistent. Python doesn't care if you use tabs or spaces, and doesn't care how many tabs or spaces you use, *as long as you're consistent.*

    There are a few utilities to check your source for proper indentation, or to convert tabsspaces.

    And the major macro-programmable editors all have hacks that let them deal very intelligently with whitespace, including automatically indenting at appropriate times.

    Plus there are a few Python-specific editors, that also do code-colouring and such.

    All in all, FeErOfWhItEsPacE is silly.

    What's the problem with lists? How would you want to write them??

    --
  • by FFFish ( 7567 ) on Thursday May 10, 2001 @09:57PM (#231170) Homepage
    Well, now, let me just rip this off directly from a Python website (http://www.python.org/psa/ Users.html). And there was a recent thread in the Python newsgroup, mentioning about a dozen more big names.

    Thing of it is, Python does what it does so well that no one notices it.

    It's like when you walk into a retail store. You don't notice that the carpets are clean. The carpets don't call attention to themselves. They're just *there*, doing their job.

    Only time you notice a carpet is when it's filthy. When its syntax is filled with !@$% symbols. When it has memory leaks. Etc.

    Anyway, the shortlist of companies using Python in commercial apps:

    Advanced Management Solutions Inc.
    * AMS provides the AMS REALTIME suite of enterprise software for project management, resource management, cost management and timesheets. The Python language engine is embedded in AMS REALTIME as a means of extending the products, and also as a way of enabling custom behavior and company-specific business rules to be supported.

    CWI
    * CWI, Python's home, has used Python in, among other things, GrINS, a 20,000 line authoring environment for transportable hypermedia presentations, and a 5,000 line multimedia teleconferencing tool, as well as many many smaller programs. See the collection of multi-media project papers.

    Digital Creations
    * A long-time sponsor of the PSA, Digital creations develops with Python - and also makes some of their Python software available for free!

    ILU
    * ILU (it's spelled Inter-Language Unification but it's pronounced eye-loo) is a (very) CORBA-ish multi-language object interface system. It has bindings for Common Lisp, C++, ANSI C, Modula-3 and Python.

    Automatrix
    * Musi-Cal(tm) is the first online calendar that provides easy access to the most up-to-date worldwide live music information: concerts, festivals, gigs and other musical events. It is maintained by Python scripts. So is their Internet
    Conference Calendar.

    Nightmare Software, Inc.
    * Nightmare Software builds 32-bit Windows software with Python - and gives some away!

    Infoseek
    * Ultraseek Server, Infoseek's commercial search engine product, is implemented as an elaborate multi-threaded Python program with the primitive indexing and search operations performed by a built-in module. Most of the program is written in Python, and both a built-in spider and HTTP server can be customized with additional Python code. The program contains over 11,000 lines of Python code, and the user interface is implemented with over 17,000 lines of Python-scripted HTML templates. Try it out on the Python.Org web search page or download an evaluation copy from Infoseek Software.

    eGroups.com (previously Findmail)
    * A comprehensive public archive of Internet mailing lists, implemented in pure Python. Latest statistics from Scott Hassan: 180,000 lines of Python doing everything from a 100% dynamic website to all email delivery, pumping out 200 messages/second on a single 400 MHz Pentium!

    DataViews Corporation
    * DataViews Corporation in Northampton, Mass., have been using Python internally quite a bit.

    LLNL
    * A group at the Lawrence Livermore National Laboratories is basing a new numerical engineering environment on Python, replacing a home-grown scripting language of ten-year standing. Paul Dubois is a central figure in that effort.

    NASA
    * Johnson Space Center uses Python in its Integrated Planning System as the standard scripting language. Efforts are underway to develop a modular collection of tools for assisting shuttle pre-mission planning and to replace older tools written in PERL and shell dialects. Python will also be installed in the new Mission Control Center to perform auxiliary processing integrated with a user interface shell. Ongoing developments include an automated grammar based system whereby C++ libraries may be interfaced directly to Python via compiler techniques. This technology can be extended to other languages in the future.

    IV Image Systems AB
    * IV Image Systems uses Python for many projects, including a satellite image production system for the Swedish Meteorological and Hydrological Institute (SMHI) (see next entry).
    This system receives raw data from several weather satellites, and produces images for many purposes, including the satellite images used for the presentation of the daily weather on Swedish TV 4.
    For more information, contact Goran Bondeson.

    Swedish Meteorological and Hydrological Institute
    * SMHI is the home of the Swedish civilian weather, hydrological and oceanographic services. It's Python-based remote sensing software for automatic product generation, using NOAA and Meteosat data, provides information to bench forecasters, objective analysis schemes, and commercial interests such as the media. At SMHI's Research & Development Unit, a Python-based "Radar Analysis and Visualization Environment"


    --
  • by Laxitive ( 10360 ) on Thursday May 10, 2001 @07:31PM (#231171) Journal


    I think you're underestimating the popularity of python. Python still has to ramp up a decent 'community module' system like perl has. Check out 'the Vaults of Parnassus' (google is your friend). It has not existed for too long, but there's a good set of useful modules there.

    The fact is, when you see python, there is'nt "one magic application" that suddenly jumps out as "the perfect thing" to use python for. I think that's because sucn an application does not exist. Python is a bit like C - it's an extremely good general purpose programming language that does a lot of things well.

    C is a simple, efficient, fast and portable low-level language for doing generic system programming.

    Python is a simple, object oriented, modular, clean language for doing generic application programming.

    Have you ever tried to do a large-scale project in perl? Something with a few ccomplicated nested data structures, a multiple threads modifying the same data model, some serious io handling? All of that rolled into one farm fresh breakfast unit. It's hard to do in perl - because perl was not designed with such uses in mind. It'd be LONG and annoying in C, because BSD sockets are a pain to work with, and C generally makes many things long and tedious (if you want to do them "right" anyway). C++ would be quite a bit better than C, but you'd still have to deal with the C system APIs, which will still be annoying. Java would probably give you quick development cycles, but nowhere near as quick as python.

    I consider python as lying somewhere in between scripting languages and compiled languages. It lets you do structured programming and gives you a powerful OO structure and modules galore, but keeps the syntax simple and clean. To me, it's a lot closer to Java than Python (this stand is supported a bit by Jython).

    It fulfills the 'glue' properties more than perl does for me. I see perl as sed with better syntax and modules (and I like perl, and use it quite a bit, dont get me wrong). Python is something you can use to quickly and painlessly write good, maintainable, modular, portable code.

    -Laxitive
  • "Only time you notice a carpet is when it's filthy. When its syntax is filled with !@$% symbols. When it has memory leaks. Etc."

    Wow, you don't know much about rugs, do you? You also notice rugs when they're especially pretty, or contain interesting patterns, or tell great stories succinctly, such as s|\W|sprintf("%%%x", ord($1))|ge.

    Btw, are you really implying that noone who programs with python actually notices the language? That they just subconsciously add in the name of the interpreter in the #! line at the top of the program, without it ever occuring to them that when they type "#! /usr/bin/env python" they don't actually realize that that means that the python interpreter is going to run. That you never have to look up a function? That you never make syntax errors?
  • The license is causing me to look at Ruby. I don't like having the license specify that a UCITA state controls what the license means.

    Caution: Now approaching the (technological) singularity.
  • I like Ruby better as a language (I prefer braces, e.g.). But Python is better developed, and has a larger library, and has more documentation.

    It all depends on what you want to do. Certainly if it's something that someone has already written the code for, then Python is more likely to have it pre-done. Also, many more systems come with Python already installed. And Python has a freeze system for packaging up a program into an executable for distribution. I've not yet used it (I tend to drop into Ada or Eiffel if I want a compiled module), but it's there.

    OTOH, Ruby currently seems to be changing faster than Python. I suspect that this is largely importation of stuff from Japan, where Ruby originated, but the effect is the same. Still, there is currently only one book on it (though another [by Matz] is on the way).


    Caution: Now approaching the (technological) singularity.
  • I'm a python newbie, so take this with a cistern of salt:

    Python is good for almost anything, but it's particularly good for studying programming, prototyping and as a 'glue' language. Let's rephrase the question, however to 'why hasn't it taken off more spectacularly?', because it is really quite popular and widely used, just not as much as perl or java. Now, when people are picking their first language they will often pick the one that's the most 'marketable' like C or java or perl. They don't understand why a good glue or prototyping language is important, and naturally they don't want to study language that's good for studying, they want to study a language that's good for doing something they need done. In my opinion, perl gives you an opportunity to do some really powerful and exciting things real quick, sacrificing some readability, maintainability and consistency in the process. On the other hand, newbies will find out that winamp, napster, etc are written in c++ and/or c and will prefer to study that, because of familiarity. And lastly, a language that
    really shines at prototyping and 'gluing' will have inherently lower visibility than other languages (undeservedly, imho). All these things considered, it also surprises me that python isn't more widely used. Is this the dreaded 'worse is better' law at work? Are many people bugged by indentation syntax? I don't know, perhaps someone who tried it and decided against using it can share his reasons?
  • I ran into this problem once, but it's not a big deal: it's trivial to convert tabs to spaces in any decent editor. I think the enforced readability advantage is well worth it.
  • I looked at it but didn't like %&$'s - the whole reason I use python is clean syntax (well, the main reason, anyway).
  • Python's fun to me, personally. I can't agree with 'dirty is good' concept, either - I prefer clean code, even when it's a 5 line script.
  • Well, what about different bracing styles? Not to mention braces adding clutter and taking up precious lines :-).
  • by platypus ( 18156 ) on Friday May 11, 2001 @12:11AM (#231180) Homepage
    ... and it's used in ESR's CML2 the new kernel config system to come in 2.5.
  • by Ambassador Kosh ( 18352 ) on Thursday May 10, 2001 @08:24PM (#231181)
    I think many overlook it not because it is not used as much but because no one makes a big deal out of its use. Zope is a good example of this. It is used in some very large organizations and it is a very powerful product. Many still confuse it with a web server though when in reality that is only the smallest part of its capabilities. What it really is good for is publishing python objects to the web, other servers via xml-rpc and other number of other things.

    I know a lot who use python because it gets the job done cleanly and efficiently however they rarely make a big deal out of which tool they used and most don't care what the solutions was coded in since it works pretty much without fail. Kind of how some people don't know their servers run unix because they have never had a need to know but everyone who has a windows server pretty much knows it because the server calls attention to itself.

    Do to the structure of python code tends to be designed rather then hacked together which in the end gives better running programs that have fewer bugs and are more modular, thus easier to fix and extend.
  • Seriously, Perl is a two dollar whore when it comes to syntax, but that's a good reason to keep coming back.

    heh. That's one of the funniest descriptions I've heard of perl yet.

    I love perl too (and I'm anxiously looking forward to Perl 6, which will hopefully have some of those shiny OO enhancements I've been craving. Alot of my scripts end up in that paradigm, and I'd love a few of the things mentioned in Apocalypse 2).

    I've started picking up python finally, mostly because of jython. I'm planning on moving to JSP and servlets for web development, and the thought of being able to prototype quickly in python, and have two languages to choose from depending on need is awful appealing. More, I have a lot more confidence in training people in a bit of python than a bit of java, if need be.

    That said, I don't think I'll be giving up perl anytime soon. It's a powerful language, and I like how obvious it is that it was developed by a linguist. It maps well to my brain. You can do amazing things with perl, in a very short development cycle, and with a bit of discipline, produce code every bit as maintainable as any other language. (sloppy perl coders have just been giving the rest of us a bad name).

    To be honest, the biggest reason I haven't picked up python sooner is the rabid python evangelists. God, they're annoying. It's a language, not the holy grail. Get some perspective.

    Conclusion? Different tools. I'm glad there's python. I'm glad there's perl. One's not going to be suddenly displaced by the other. I sort of think of python as the brazen adolescent, trying to figure out where it fits in, and pushing at it's elders. It will settle down, and be useful for a long time to come, I'm sure.

    That was a bit of a rant, but I feel much better getting it off my chest.

    - eddy

  • the ai guru peter norvig has an interesting comparison between common lisp and python on his website.
    it's quite favorable and puts things in a nice perspective. not all languages make it past a comparison with one of the coolest language on the planet.

    check it out at http://www.norvig.com/python-lisp.html [norvig.com]

    /largo

  • > Yes, there are modules out there, but nothing like CPAN or gamelan or even MFC/C++
    > codeguru.

    It should be noted that Python comes with a whole heck of a lot of useful modules, so out of the box, there isn't as great a need for an external module archive such as CPAN. However, Python folks are working on a CPAN-like collection for Python too. See Python's Catalog-SIG [python.org].

    For what you get in Python, see its Global Module Index [python.org]. You'll see why they say 'Batteries Included'.
  • by Pengo ( 28814 ) on Friday May 11, 2001 @04:53AM (#231185) Journal
    He might be a great advocate, but lord.. probably the only Orielly book i felt cheeted on. (Maybe the only other one of from ORielly would be mastering TSQL) :)

    *Sigh*


    --------------------
    Would you like a Python based alternative to PHP/ASP/JSP?
  • Enjoyable to write Python code?

    Yes -- it's clean and explicit, which means your eyes won't glaze over when you revisit it a week/month/year hence.

  • Hmmm... Stack in Python... really hard... mind boggles:

    Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
    Type "copyright", "credits" or "license" for more information.
    >>> z = [1, 2, 3]
    >>> z.append(5)
    >>> print z
    [1, 2, 3, 5]
    >>> print z.pop()
    5
    >>> print z
    [1, 2, 3]
    >>>

    In all truthfullness though, the book does suck... I like "The Quick Python Book" much better. And the html manual kicks ass... and there's always doc strings!:
    >>> dir(z)
    ['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'so
    rt']
    >>> print z.append.__doc__
    L.append(object) -- append object to end
    >>>

  • In all truthfullness, you shouldn't: Java is faster than Python, and servlets kick ass.

    But say you wanted to be able to extend your servlet code, poke at live servlets, or get a lot of 'dirty' information out quickly (quickly as in development time). You can go to jython.org and grab a fully compliant Python interpreter implemented in Java. Presto, you got yourself a 4GL over your Java code. You can go google for JPE, a Java-Python bridge and go load Python extensions in C/C++ (much easier, IMHO than JNI) and talk to Python from Java and vice versa. Both Jython and JPE allow you to extend Python from Java and vice versa. That kicks ass...

    Java has its place (that layer of apps just above C/C++) and so does Python (the layer on top of Java). The really great thing is that you won't have to switch mindsets. Python is clean, consistent, and really, really easy to write (much more so than Java, again IMHO).

    Again, IMHO, I'd much rather prototype code in Python, work on the design, see what my design is missing, where I have to plug holes, and I can do so really quickly and easily (Python allows you to be more dirty than Java; multiple inheritance, writeable namespaces, exec(), etc...) and then I can profile the code (profiler comes with the std library) and extend the performance-bound parts in C/C++, again very easily. NumPy for example includes all of LINPACK: you get really great C/Fortran speed in numerical functions, but you get to use a RAD language.

    Try it, you'll like it. Damn, that should be the Python slogan :-)...
  • Man... I love writing code in Python... it is fun as hell (OTOH, I also write awk, ksh, a coupla obscure SPLs you never heard of, so it's probably a bad comparison :-). And the truth is, you can be "dirty" in Python: do things the quick and easy way, instead of the proper OOP way. But, python allows you to quickly read even through bad code. And its ability to be dirty allows you to refactor such bad code easily.

    Always, always, good code comes from good coders. A good language though, a) doesn't throw away the key of what the code does *cough*Perl*cough*, and b) allows you still enough flexibility to fix code, hack things together fast, etc *cough*Java*cough*.

    Don't expect all of Perl's bells and whistles in Python: Guido doesn't want to pollute the language with equivalent ways of doing things, which makes perfect sense to me: helps readability, and forces everybody to strive towards increasing performance and features in the same 'niche' of code. But there's also *plenty* of power in the language and there is a very big toolset to work from...
  • by costas ( 38724 ) on Friday May 11, 2001 @12:52AM (#231190) Homepage
    Let me add to the list a 3,000 line package written in Python by yours truly that wraps around Microsoft Visual SourceSafe so that VSS can be used by Unix clients (python CGI talking to a python client script).

    If anybody's interested I can put the source up for everybody to see/use (no docs though :-)...


  • Acutally kind of interesting. The only thing funny is that java always hits the same marks on your memory usage. That indicates a shortcoming in the methodology - probably JRE defaults. I am surprised to see it do so well on CPU usage, though.

    My personal experience is that Python is also CPU hog, although fast, for all that.

    The point being, you might find really different results depending on how hard you stress certain things. And once you find resulting bottlenecks, you [should] start optimizing. So even pretty good comparisons can be made very questionable in the hands of good programmers and administrators.

    <flamebait>
    On the other hand, Python makes the "whitespace overloading" hoax seem plausible.
    </flamebait>

    Seriously, Perl is a two dollar whore when it comes to syntax, but that's a good reason to keep coming back. Perl works better for me for many things. Its poor performance on object creation, method invocation, and some other areas was interesting. If Perl had good OO, it would be a lot better for certain kinds of use... and under sustained use (where startup costs are more negligible) I have found it to be extremely fast (e.g. under mod_perl).

    This post is illegal.

    Boss of nothin. Big deal.
    Son, go get daddy's hard plastic eyes.

  • Pro 1: One big benefit is its ease in debugging.

    Pro 2: It's easier to write than Java (well, for me, anyway)

    Con: If you don't know Python yet, a "huge" project isn't exactly where I'd start...
  • I find the old "Perl vs Python" battle a bit tiresome. While reading the article, though it hardly touches on Perl, I KNEW it was just bait for battle.

    I don't think that his book was bad (I've read it). I think Python rocks. I don't know very much Perl, but we use both extensively at work and I can see that they each have their strengths.

    On a positive note, I wrote my entire website (and I suck at site design, I know...) in Python, and it was (and still is) quite a fun project.

    Just my $.02. Flame away, please.
  • I can code well in several languages/environments, including C/C++, perl, Emacs Lisp, Java, x86 asm etc.. up until very recently I've ignored Python completely.

    Once you know one language its easier to pick up another, however when you get to point when you can program in four, or five, you wonder what the point of learning another one is.

    Anyway, I've just been trying to find a web-based jukebox for a large MP3 collection - and the best one I could find, (that didn't need a database or anything fancy), was Edna [sourceforge.net] - and lo, and behold, it was written in Python.

    After looking over the 300 lines of code that implements a webserver, a jukebox, and playlist generator I'm now increasingly tempting to learn more ... if only I could get my head round the way lists are written, and the whitespace thing...


    Steve
    ---
  • I can give you _my_ opinion. I was doing commercial work in Smalltalk back in 1982, at Xerox. It was heavenly! Great development tools, a really easy to program GUI, and a powerful language with extensive libraries.

    Smalltalk's biggest problem, though, was "the wall" that the language put up between itself and the operating environment. Whenever you had to interact with something outside of Smalltalk, it was extremely painful. I think it eventually killed the language as a serious contender.

    The "wall" wasn't there because the language designers were silly, by the way. It was a response to the fact that in the 70s when a lot of the Smalltalk thinking was being done, different OSes were really, really different. Smalltalk was portable because of "the wall", which was a big win. Today, the various OSes are much more similar, and the choice doesn't look as great.

    By the way, Squeak, the successor to Smalltalk, looks very good. It still has "the wall" though, which is why I don't spend more time with it.

    Kurt
  • by KurtP ( 64223 ) on Thursday May 10, 2001 @07:37PM (#231196)
    Where have you been hiding? Python has gotten pretty interesting, especially the nifty stuff you can do with Zope and Numeric Python. As for a CPAN equivalent, you may want to check out the Vaults of Parnassus at http://www.vex.net/parnassus/

    For a language that hasn't taken off, there's a lot of stuff to be enjoyed (over 900 goodies at VoP last time I checked). Nifty net stuff, interesting numerics, GUI systems, sound and graphics libraries, and so on. Not to shabby.

    I used to hack a lot more in Perl, but it got to the point where I do anything more than a few hundred lines in Python instead. It's just a lot easier to get it working and keep it working in Python.
  • Python has not "taken off" as Java did or Perl did in their day because it is not synonymous with an exciting new platform like applets or CGI. Not that applets or CGI matter today but they were neverthless great publicity for those languages.

    Python is too general purpose to get attached to any particular niche like that. It is just a little bit better for most taks than most of the competition. If you don't believe me you'll have to try it out yourself.
  • I was a Smalltalk (VW 2) programmer in '94-96 and I totally agree. The portability was absolutely amazing. You could program an application from the ground up on Windows and move the *binary* to HP-UX and it would run, perfectly.

    I loved the language, too. Because of the extensive class library, you could code major functionality in a method of, say, ten lines of source (often less).

    As our project matured, we were forced by upper/middle mgmt to develop in c++ on HP-UX. It was a pain until the company licensed a toolset called tool++.h, which was in a way very funny - what it did was provide a Smalltalk-style class library to our UNIX c++. We were able to do useful things, again! But, still, we always wished we were still doing it in Smalltalk.
  • Alright, I admitt I should probably spend a few hours pouring over python literature, but hey, that's what /. is for, right?

    So, my understanding is that Python is probably more useful for projects that involve lots of glue code (COM talking to CORBA talking to Java, etc). I also seem to get the impression that Python doesn't suffer from the "too chaotic for big project" problem that Perl has.

    So help me out here. I'm writing a huge, scalable middle-tier in Java using servlets and JDBC. Why should I bother with Python?

    Pros Cons etc. Whats the story here people?

  • That sounds like a VERY interesting project. I'm sure that you could find a home for it at sourceforge.
  • by Speare ( 84249 ) on Thursday May 10, 2001 @06:39PM (#231201) Homepage Journal

    I heard about Python several years ago, from a guy who was at Xerox PARC at the time. Yet today, the Python movement doesn't seem to be much farther along.

    Java's lost some oomph in the marketing steamroller but gained some badly needed credibility with servlets.

    Perl has gone from an obscure report munger to a community powerhouse. You want a feature? Perl has it.

    Python's been ported to just about everything including PalmOS, but the shared source code I've found has been extremely limited or arcane. Yes, there are modules out there, but nothing like CPAN or gamelan or even MFC/C++ codeguru.

    From the little I've investigated of Python, at three different occasions, it's clean, fast, easy to embed, easy to extend, easy to code for. Some people balk at the indentation style but that took me 30 seconds to get over. Some people balk at the shell interpreter aspect, but that felt like a prolog or lisp pmachine interface to me.

    I'm not flaming, just wondering, what has Python been doing with itself, to have grabbed so little attention in the world stage?

  • "Learning Python" is much better, imo, though by
    the time it came out I couldn't learn much from
    it, so I don't know how it would look to a
    beginner.

    Alex.
  • I'm no expert, but I'm not sure you can say absolutely that there are more appropriate languages than Python when it comes to doing oo work. Bruce Eckel is probably an expert though. Here's an interview:
    http://www.technetcast.com/tnc_stream.html?strea m_ id=466

    -beme
  • Python is great for embedding a scripting control language into complex compiled (C/C++) systems. It's found it's way into many graphics rendering packages and it's used at ILM extensively. I meet people all the time that love Python. I meet more that love Perl and never bother to look at Python. I think Perl just has mindshare and people don't bother to look around.
  • by captaineo ( 87164 ) on Thursday May 10, 2001 @11:40PM (#231205)
    The fact is, when you see python, there is'nt "one magic application" that suddenly jumps out as "the perfect thing" to use python for. I think that's because sucn an application does not exist

    I would say Zope (and persistent object databases in general) might be Python's "killer app." I've been doing a bit of work on a similar database system, and certain aspects of Python make it very well suited for this kind of stuff... e.g. a very clean object model, override-able __getattr__() and __setattr()__ methods, consistent reference semantics throughout, etc. Python is the perfect toolbox for building persistent and distributed OO systems.

    About the only extra things I've been wishing for are optional static type-checking and C-like syntax (I like my curly braces, so shoot me =). Static type-checking is really necessary because I'm finding that I make just as many type errors in Python as memory management errors in C =).

    Dan

  • It [Python Essential Reference] makes no attempt to teach you how to program --so don't buy it if you are new to programming AND to Python. But ifyou've used several languages and want to do a project in Python it is quite useful.

    It is the only Python book I own, and the few times it has not had the information I need (mostly specifics about modules) I've been able to find what I need in the online documentation.

  • I think Python will take off eventually, based on my first hand experience.

    The simple syntax and powerful features of this scripting language make it an excellent choice as a first language. Last summer I got my 11 year old nephew playing with some simple programming concepts using Python.

    The generality and power of the language made it my first choice a year ago when I had to come up with a "mortgage recalculator" to figure out what payments would pay off the balance for certain interest rates in various time frames. Years ago I would have done that in C, Fortran, or HP-25.

    I'd love to use this language as the high level wrapper for some projects at work, but we're heavily into C++ frameworks and I don't feel up to the level where I could SWIG my way into Python.

    At any rate, I think Perl has the advantage of being first and an initially better regex capability. In that way, some of the thunder for scripting language audience share for Python was lost to Perl. This may be a reason that Tcl hasn't really caught on too much, either.

    In scientific circles. that handle numerical data for simulations and visualization more than text, you'll find a lot more fans of Python. The growth limiter there has been that any algorithm requiring extreme efficiency taxes a scripting language, forcing one into a multi-language environment, such as Python on top and C down below. Fortunately, with all the modules for Numerical Python, etc. becoming available this bottleneck is becoming less of an impediment and I think you'll start to see increasing usage.

  • by teg ( 97890 ) on Thursday May 10, 2001 @07:09PM (#231208)
    It's used for more and more projects in Red Hat Linux - it's used in the installer (since RHL 6.1), it's used in up2date, it's used in our new batch of configuration tools. If there needs to be a GUI, glade and python are there from the start.
  • We know what perl is good at, everything. [...] What _is_ python good at? Maybe it just hasn't found its niche?

    Good, sounds like there's a nice well-defined niche for Perl, then :)

    P.S. Perl's master plan (or what passes for one) is to take over the world like English did. Er, *as* English did...

    Larry Wall, 199705201832.LAA28393@wall.org


    my plan [gospelcom.net]
  • How can I resist? For a redesign of lisp that is actually better, see Standard ML at:

    http://cm.bell-labs.com/cm/cs/what/smlnj/sml.htm l

    Also for a more hacker-oriented flavor, try O'Caml at:

    http://caml.inria.fr/

    Haskell (haskell.org) is also worth checking out, too.
  • I agree. I think this was a minor design error that they are always on the defensive about, since people always seem to point that one out. =)

    cc-mode for emacs does an awesome job of auto-indenting. Just go C-c C-q and the whole function is beautiful. Whee!
  • I guess I was trying to say that for scripting tasks, you probably don't need the "object-oriented" methodology. For programs that do, well, there are more appropriate languages.

    Yes, I have tried Python. =) As I say, it is nice, but that's not what seems to count for (many) hacker types!
  • I think I met you on IRC before. Is it still true that you haven't written any big programs in SML or Caml?

    I know you're unwilling to budge on this, but:

    There are advantages of code which can interpret itself, but the same functionality is easily achieved through the use of ML datatypes. Caml now even has a pre-processor which lets you invent your own syntax and do traversals if you really need it.

    Static typing is awesome for large program development. Your programs are faster, and you catch bugs earlier (no more run-time type errors!). When you need "dynamic" typing (and one seldom does), datatypes or caml's Variant types make it so, so easy. Pattern matching makes it easier to write than lisp code, too (though bigloo has made some headway here..)

    No other language I've seen has a module system which can compare to SML's. Polymorphism and functors are an amazing combination. The fact the language comes with a formal definition is also pretty keen.

    As for being expressive, isn't it impossible to represent a real, honest-to-goodness integer in lisp? (because it is always tagged for dynamic dispatch?)

    You should take 15-312!
  • I consider python as lying somewhere in between scripting languages and compiled languages. ... To me, it's a lot closer to Java than Python.

    Python is closer to Java than it is to Python? ;)


  • By "function polymorphism" you mean overloading? You can use variant tags in ocaml to do the same thing, which is just what happens in lisp (except you can use pattern matching. =))

    Pattern matching is better than just conditionals. First of all, they can be compiled into jump tables for better efficiency. Second, you can nest them, which has the advantage of nicer-looking code (I guess this is subjective). Less subjectively, the translations of some patterns require duplicating code: the lisp version would have many copies of the same code which would need to be maintained in parallel.

    Lisp does not have static type-checking, at least not in the sense of SML or O'caml. It just doesn't!

    You really really should try out some more languages (in depth). Lisp is good, and indeed they are all turing-equivalent, but we have come a long way! You may thank yourself...
  • by Tom7 ( 102298 ) on Thursday May 10, 2001 @08:08PM (#231216) Homepage Journal
    I think people prefer perl because, given all its intricacies and built-in features, programming in perl is fun. It's an adventure.

    Programming in python might produce better code, but it is enjoyable to write? Most write-only code (ie, scripting tasks) are tedious if you write them the "nice" way. Hackers find (perverse, perhaps) joy in writing these clever minimalist perl scripts that rely on its various uncivilized features.

    When it comes to writing big code, though, writing in any scripting language is problematic for a number of reasons. (Not the least of which are performance, lack of modularity features, and difficulty in producint "stand-alone" apps.) So even if Python may be a nicer language in almost every respect (and who's to say if it is?), that doesn't mean anything, because scripts were meant to be dirty.

    In other words, when it comes to scripting languages for use by hackers: terse, tricky, stateful, but "powerful" languages win.
  • I've used Python a bit to write scripts for Blender. Maybe I've been programming in C for too long, and maybe because Blender's editor sucks and deals with tabs differently than my external editor, but any language that is whitespace delimited just drives me insane. I could tolerate it for the purpose of elegance except for one thing:

    Tabs and spaces are treated differently!

    This means that I can write code that looks right, but the parser chokes on it. If I edit some else's code and they use spaces but I use tabs, everything gets screwed up. This, to me, defeats the entire purpose - "enforced readabiliy" far too easily easily gets transformed into "obfuscated syntax errors".

    This is the same reason makefiles make my head hurt. To me, it's a glaring user interface / usability problem, in an otherwise very cool language.
  • What is the answer to VB in Unix platform. One of the linux gurus had a reply: Python + Tk. While this may be a little far fetched, this is definitely the best available alternative till another one comes by.

    There are now. This is my preferred (YMMV): glade+python(with gtk and libglade modules). Yo go like this:

    • build visually yor GUI with glade, a very nice tool for the job.
    • Instead of generationg code, which IMHO is rather messy, you use libglade to glob the GUI files and generate on-the-flight all the widgets you need writing only few lines of code for file ( it even does 'automatic' callback bindings, which is great).
    • You code the logic behind the GUI in python, using python-gtk to manipulate GUI widgets.
      • Clean and fast.

  • Programming in python might produce better code, but it is enjoyable to write?

    Yes. You can have all the fun you want (and more). Like many Very High Level Languages, Python frees you from most of the housekeeping a programmer has to do with C, C++ and even Java.
    Tanks to its coerent semanthics and clean syntax, you wont have to squeeze your brain trying to remember obscure rules (or checking brackets)).

    Did you ever give-up adding feature X to your program, because it would take too long? Just think : how much of this 'too long' was housekeeping? With python, you might find that you have the time ...

  • No actually I didn't know that. Thanks for replying, I may have to look at python again. (I suspected the semicolon was redundant but after hacking in C long enough it's sort of an instinct ;-) ).
    --
    News for geeks in Austin: www.geekaustin.org [geekaustin.org]
  • Just my two cents, becuase I think that having a central print magazine coming out every month is a really strengthening thing for a "marginalized" community (e.g. what the linux journal did/does for the linux community). I say "marginalized" from the standpoint that python is a much smaller community than, say, java.

    My other four cents worth would be a) something besides whitespace for block indentation (by that I mean let me use {} if I want to, and I do, if for no other reason that when I'm 5 levels deep and want to write something like
    someProperlyAndDescriptivelyNamedVariable = somObjectWithAnotherLongAndDescriptiveName.aMethod WithSimilarlyLongAndDescriptiveName(someObviouslyN amedParameters,someOtherObject.someOtherMethod());
    it's running off the side of a normal xterm real quick) and b) constructing a CPAN equiv. (addressed by posts above, so thats minus two cents).


    --
    News for geeks in Austin: www.geekaustin.org [geekaustin.org]
  • I wouldn't mention SML ;) OCaML is much better. But neither of them is as expressive as LISP, sorry. The OCaML optimizing compiler kicks ass, but the language itself is not as expressive as Lisp is. The sacrifices were mostly made in the interest of speed. Plus, OCaML attempts to expand it's expressiveness through extra syntax, which is a fundamentally flawed method. Read the introduction to R5RS for a good reason why.

    And BTW, I'm at CMU too ;)
  • Last time I was writing programs in OCaML, my computer hardware crashed and was out of commission for several weeks. I've been too busy in the time interval to do any more, unfortunately.
    According to a good friend, OCaML does not have function polymorphism (such as 'defmethod' in Lisp) but it can be achieved through various hacks.
    If you really want to write your own syntaxes nothing compares to the Lisp macro facility, (my friend wants to be able to infixify functions in OCaML, like in SML, but I think that's just a waste of time ;)
    All good Lisp compilers can infer types at compile-time, just like the OCaML compiler, and you can even specify static types and alter the amount of optimizing a compiler will do. Not only can you specify static types, but you can specify ranges as well! For example: (the (integer 0 100) x) specifies that x must be an integer from 0 to 100.
    Pattern matching is an interesting feature, but its not that hard to write a condition to check for a cons and then do something. Recursive types are also interesting, I need to experiment more with those.
  • Maybe not; you're in Java's sweet spot.

    However, IMO, Java is starting to suffer from Ada syndrome; starting from a clean design, marketing and/or design by committee is causing it to add every damn possible feature in the world, causing a mess. Python, however, remains simple.
  • Perl is the crack of all programming I have ever done, from UNIX/C to MFC C++ and now Java. Python is STILL an advanced PHP to me, not quite thd fix I need with Perl. I love skipping a whole new language since one (Perl) does it all...and is more advanced. No one has come close to CPAN (yet).
  • by shredwheat ( 199954 ) on Thursday May 10, 2001 @07:59PM (#231226) Homepage
    Ok, pygame [seul.org] is my project which wraps SDL for use with python. The project reached version 1.0 about a month ago. Just recently I was able to release SolarWolf [zopesite.com], which is a full featured action/arcade style game. (it's worth your time in gameplay too) :]

    This type of project goes a good way to show python is more than up to the task for quick paced arcade games. Currently pygame is adding support for the pyopengl modules, which is looking surprisingly good in terms of performance.

    Honestly, seeing my humble project listed in the "What do you think are the most exciting developments going on in Python right now?" answer has made for a sweet day!
  • Perl is hard to spell too... Pearl? Perl?
  • I think people prefer perl because, given all its intricacies and built-in features, programming in perl is fun. It's an adventure.

    Have you tried Python? I'm a sucker for the fun-factor in programming languages, and Pythons straight, clean syntax and straightforward implementation of object-oriented ideas (totally dynamic binding is a bliss for Quick-and-Dirty stuff) makes it every bit as fun as perl. Python "just feels right", while Perl is "everything for everyone" .

    Ever tried doing object oriented development in Perl? Used lots of references (Python uses references all the time), typeglobs? Fun? Well, perhaps it's fun but some people don't have time to learn all that stuff just to learn the kludges of one programming language.

    Obviously, perl rocks for awk/sed style stuff.

  • So even if Python may be a nicer language in almost every respect (and who's to say if it is?), that doesn't mean anything, because scripts were meant to be dirty.

    Look at this script [uchicago.edu] and tell me if it's written nicely (and yes, it does actually work)
  • The features listed as Good Things in Python: object-orientedness, consistency of approach, ease of development, dynamic typing and so on. They all exist in Smalltalk. Smalltalk has the advantage of considerably greater maturity in terms of virtual machines and development tools. Yet Python seems to be gaining popularity as Smalltalk wanes.

    This isn't a dig at Python; something good is something good, no matter where it turns up. But what is it about Python which makes it popular, while Smalltalk never seems to quite make it?

    • The first and most obvious thing is Smalltalk's apalling marketing decisions. Run-time licenses, expensive development licenses and costly support obviously went some way to raising the bar, although there are now good, free versions of Smalltalk available for non-commercial work.

      But ParcPlace not taking up Sun's offer to bundle VisualWorks with SunOS. Ow!

    • I don't know what Python's memory footprint is, but Smalltalk's can grow quite large. With Java, perl and Python around, resource hunger no longer seems to be a crippling issue, though.
    • An O'Reilly book obviously helps :-)

    There's got to be more to it than that, though.

  • i learned python from the docs on python.org and i'm happy... i'm too cheap to buy a manual for a language as easy as python =] Perl, OTOH, is a language where several books are handy, often necessary.

    -----------
    MOVE 'SIG'.
  • If egroups.com implementation has taken 180,000 lines of python; then they are doing something wrong (Or they are writing too many comments).
  • I think I can safely say I speak for the entire slashdot community when I say "Lutz seems to have lots of fingers in lots of open source pies" and "Guido van Rossum is extremely ugly" and "Python is a language for hermaphrodites" and several other things that I really enjoy saying.,

    --

  • by iomud ( 241310 ) on Thursday May 10, 2001 @06:56PM (#231234) Homepage Journal
    We know what perl is good at, everything. We know what PHP is good at the WWW. What _is_ python good at? Maybe it just hasn't found it's niche? I don't mean to sound like I'm undermining the power of python I am sure it's very capable but where does it excel? What job makes python the right tool?
  • All my respects to Python, but I have to ask the same question about Ruby.

    As you say, it's clean, fast, easy to extend, easy to code for. And there's no whitespace issues to balk at, even for 30 seconds (although there are legitimate reasons to balk at whitespace issues for more than 30 seconds).

    I have used Perl almost extensively, and love it--Perl deserves all the use and attention it has--but when I think of something "cleaner" I'd like to use, my thoughts switch to Ruby, not Python.

    In Ruby's case, though, I can probably say its age is why it hasn't moved further yet (at least in the U.S.;the first Ruby conference is this year). Ruby's acceptance has moved rather quickly when you think about it.

    If you have been thinking about Python, and haven't taken a look at Ruby, *please* do. You'll probably like it. Ruby's too good to not at least check out.

    www.ruby-lang.org [ruby-lang.org]

  • For all you diehard pegasus mail [pmail.com] fans who can't wait for version 4 to come out in a month or so, here is a snippet from the features list on Pegasus mail v4 progress page [pmail.com]:
    * Python scripting language. Pegasus Mail has a completely new object-oriented interface for use by extensions and plugins. We have taken advantage of this interface to provide a special plugin layer for the Python scripting language, a widely-used Open Source scripting engine. Using this, it will be possible to develop your own scripts to do just about anything, and integrate them into Pegasus Mail. And yes, we will be making sure that we don't fall into the same traps as Microsoft regarding problems with scripts executed by mail.
    Pmail is not open source, and only runs on windows, but it's free, always has been, and it's the oldest windows mail client in the world! I only know Perl, but being the pmail fan I am, I guess I'll have to look into Python soon :)

    -Kraft
  • lack of modularity features

    Apparently you haven't used Python, or even read the docs; modularity is one of its strongest features.

    Programming in python might produce better code, but it is enjoyable to write? Most write-only code (ie, scripting tasks) are tedious if you write them the "nice" way.

    First of all, I use the interactive Python console to accomplish simple scripting tasks, which is a breeze. I spend so little time accomplishing my goal that I can move on to something I really enjoy in short order, such as a more challenging program.

    If the task is slightly more complex, I figure out the basics on the console and then write the complete program in a module (in Python, a module is just a file of code--a "script"). When I'm done with my simple scripting task, that module lies around waiting for me to need some slice of its functionality (a function, for instance) in the future. If I do, I just 'import' it and go to town.

    For more complex tasks I use OOP, which is pleasant in Python, though not as formal and featureful as in the likes of C++. For example, I've written a fairly involved network app that uses both multithreading and sockets extensively. OOP happens to match the way I think, so I consider solid support for it indispensable (before you suggest this, I was not "raised on OO" and therefore did not begin exploring the broad world of languages with a favorable bias toward it).

    As for power, Python has it aplenty. The language's philosophy, though, is that extra power should be added uniformly--through the modules and class mechanisms--rather than cluttering the core language with lots of bizarre constructs.

    Concurrent programs are a breeze with the threading [python.org], there's a parser [python.org] module for manipulating Python parse trees, an shlex [python.org] module for concocting simple lexers right off the bat, a Numeric [pfdubois.com] module for maxtrix manipulation and other scientifically oriented numeric programming, various imaging/graphics modules [vex.net] for graphics programming. These are just a few of the modules that I actually use. All of this, and the core language remains the best compromise of simpilicity (Lisp) and comfort I've ever used.

    For most programming tasks (even complex ones), C++/Java-type languages aren't clearly superior. Bruce Eckels, author of _Thinking_in_C++_ and _Thinking_in_Java_ (thus clearly well acquainted with both), says [mindview.net] "Python is my language of choice for virtually all my own programming projects".

  • remember, english ain't the most spoken language in the world, just the most spoken language in america

  • Let this be a lesson on how fatal software bugs can be and how even bad jokes can lead to tragic results:

    The wrong poverty attribute is set in the method solveWorldPoverty() - I mean how bloody obvious was that but still - the worldPoverty attribute is actually part of the super languagePlatform.., Java and not relevant here. I should have set the attribute noMorePoverty instead. (Note to self: you are an idiot!)

    See how such a small error can cause such a catastrophic problems on a world scale! My apologies go out to all the victims. I am truly sorry.

    Just imagine if I had used Office 2000 instead of Office 10 to cure cancer though ... *shiver*

  • by benspionage ( 265723 ) on Friday May 11, 2001 @01:37AM (#231240) Homepage

    Hahahahahaha! Python, Perl, Java, .NET, hot mamas, pimp daddies, you belong to me.

    I own your buzzwords .... I own your languages ......

    Ladies and Gentleman I introduce the language, the platform, the enabler that will unite the world ..........

    Jython#PerlC++XMLNET

    I have a prototype and some examples shown below, in java, for you to realise the power and show that I am not talking out my arse:

    public languagePlatformEnablerAndAllRoundGoodGuy Jython#PerlC++XMLNET extends Java implements Python, Perl, C++, C, C#, .NET, XML
    {
    private boolean worldPeace = false;
    private boolean noMorePoverty = false;

    public void solveWorldPeace()
    {
    // World peace brother!
    worldPeace = true;
    }

    public void solveWorldPoverty()
    {
    // No more poverty man!
    worldPoverty = true;
    }

    public void cureCancer()
    {
    // With the powerful new feature of M$ Office 10 who needs cancer!
    new MSOffice10().setCancer(false);
    }
    }

  • I think so, but thats personal bias. I've taken the time to acclimate myself to the language, and use it fairly extensively for html generation.

    I'm considering cleaning up my scripts and releasing them in some sort of mishmash, just on the off chance that other people can make use of them..
  • The indentation style is one of my favorite features. Its almost impossible for me to working code that isn't readable at the very least.

    Of course, enforced readability might very well be what is holding the language back. :)

  • I think as well as comparing the modules 'out there' one shouldn't forget the modules that python comes with. There are more than you could shake a very big stick at including XML, smtp, telnetlib, threading to name but a few. Together with other 'almost standard stuff ' such as Mark Hammonds win32 and asy interfaces to tk/wxWindows it makes a very attractive package. I hope it continues to snowball.
  • "But perhaps the most important change is Python's growth in popularity. "

    $Cha-Ching$!!!
  • For a redesign of Lisp that is actually better (at least for the unwashed masses), see... Dylan. Dylan is object-oriented from the ground up, has infix syntax, has hygenic macros, has a flexible module system, and has a native code compiler...
  • I'm currently doing a cross-platform project in Python with PyQt. Compared to C, C++, and Java, Python is cool and a pleasure to use... but language-wise, it's not on the same level as Dylan (one of the languages that Norwig compares). Dylan is considerably better designed and more powerful... and Dylan has real compilers. If Dylan has cross-platform GUI libraries, I would definitely be using Dylan.
  • The whole issue in question would never have come up had this been available in the days of "Programming Python [1st Edition]."

    Instead of showing one simple way of doing it, he showed many complex ways of doing it, justifying it on the grounds of performance, thus implying that it was necessary for acceptable performance. These are exactly the kind of trade-offs and effort that one goes to a scripting language to not bother with.

    Where Programming Perl tells you over and over again "do it however you like, it's okay to be ugly as long as it's useful, don't worry too much about performance unless it bites you," Programming Python emphasizes things like performance, at a time when Python was much slower than Perl (has this changed much?), and well-thought-out elegant, maintainable code, in a language that's supposed to replace my favorite hack-it-out-in-five-minutes kludge language. That's entirely aside from the poor organization and generally bad writing.
    --
  • by Flying Headless Goku ( 411378 ) on Thursday May 10, 2001 @09:25PM (#231250) Homepage
    I've got that steaming pile of excrement right here, propping up my monitor to eye level. The major practical example? How to implement a stack.

    In Perl, you want a stack? Use push and pop on an array. Want a queue? A deque? A shelf or scroll? Use shift and unshift too. It's all done in C, and faster than anything you can write yourself in a scripting language, even though it's all random access, too. In Python, you write a class, making sure you provide all the methods you will want to use with it, and carefully considering the performance issues of various methods, because you're working around a tremendously slow interpreter to make a basic data structure that should be built into every scripting language.

    (incidentally, the multifunction list of Perl is probably my favorite feature, even over regexps and hashes; I use stacks and queues for everything, far more often than I use random-access arrays)

    That's the impression I got from this book anyway. I was very enthusiastic about Python before I read Programming Python. To this date I don't know whether Python really only looks good until you actually try to use it, or I just got that feeling of utter hopelessness from the book.
    --
  • by reposter ( 450888 ) on Thursday May 10, 2001 @07:13PM (#231253)
    "Perl is worse than Python because people
    wanted it worse." - Larry Wall, 14 Oct 1998

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...