Slashdot Mirror


TIOBE Declares Python the Programming Language of 2007

The TIOBE Programming Community Index has declared Python as the Programming Language of 2007 due to a 58% surge in its popularity rating during the year, making it now the sixth most popular programming language and finally surpassing Perl. They also assert that Python has become the "defacto glue language," being "especially beloved by system administrators and build managers."

166 comments

  1. Great, lets all program python in 2007! by Anonymous Coward · · Score: 2, Funny

    Oh, wait. A bit late for that isn't it?

    1. Re:Great, lets all program python in 2007! by Anonymous Coward · · Score: 2, Funny

      They got the date wrong. The year of the Python doesn't come until 2013.

    2. Re:Great, lets all program python in 2007! by Anonymous Coward · · Score: 0

      Pfft. Python? That is SO 2007!

  2. Maybe we will see more Web by Burz · · Score: 1

    ...frameworks and apps written in Python. It got off to a good early start with Zope, but the hype over PHP sadly swamped all else.

    1. Re:Maybe we will see more Web by Scarblac · · Score: 4, Informative

      Currently Django, Turbogears and Pylons are all hot. Great web frameworks are there, start using them :-)

      --
      I believe posters are recognized by their sig. So I made one.
    2. Re:Maybe we will see more Web by abigor · · Score: 2, Interesting

      I'll second the good words for Django. Never used the others, but Django is just great.

    3. Re:Maybe we will see more Web by Simon · · Score: 3, Funny

      Dude, as was mentioned at PyCon 2007, there are more Python frameworks than reserved Python keywords. A framework shortage isn't the problem. ;-) http://www.b-list.org/weblog/2007/feb/23/pycon-2007-web-frameworks-panel/

      --
      Simon

    4. Re:Maybe we will see more Web by SkelVA · · Score: 5, Interesting

      I just picked up django two weeks ago and I'm loving it. I'm converting a PHP project slowly, and as an anecdote on how much more productive django is than PHP (for me):

      I had some features I had estimated out in PHP (over the last 6 months my estimates have been pretty dang close), and I implemented several of them in Django/python instead. I averaged beating my PHP estimate by 1/3rd, and that's including the time I spent trying to learn how the heck to do things in Django. I can't wait to see how things look once I've got at least an intermediate understanding of my framework. I don't hate PHP, I just love python much more.

    5. Re:Maybe we will see more Web by daeg · · Score: 1

      The only problem is finding easily relocatable Django candidates. :-) (*cough* Tampa, Florida, anyone?)

      We run almost everything in Django -- website, management, and patient records (secured, don't worry, and kept relatively anonymous... no SSN, etc).

    6. Re:Maybe we will see more Web by mysqlrocks · · Score: 3, Interesting

      I'm converting a PHP project slowly...I averaged beating my PHP estimate by 1/3rd

      Perhaps you learned something the first time you solved the problem which helps you solve the same problem quicker the second time? Perhaps if you redid the project in PHP (I know this would be pointless, but for sake of argument) it would be just as fast as in Python?

    7. Re:Maybe we will see more Web by SkelVA · · Score: 5, Informative

      Perhaps you learned something the first time you solved the problem which helps you solve the same problem quicker the second time?

      That would definitely effect any re-implementation I had to do. I probably didn't make myself clear, but the efficiency was gained on 100% new code adding a new set of basically standalone features (A quizzing module added to a document control system). Of course, the efficiency gain was over my estimates, and they're subject to the accuracy of my initial estimates. I've been using the trac timing and estimation plugin to track my estimations over this project though, and they've been pretty dead-on (especially the last couple months).

      When I go back and do re-implementation of features already present in PHP, I should only expect big gains coming from being able to just port code instead of design. I would really like to see more empirical evidence on the topic myself, but all I have to go on is my personal data.
    8. Re:Maybe we will see more Web by Joe+Tie. · · Score: 1

      Some more praise for django here. One of the great things about it for me is how well it scales up or down. I never feel like I'm forced to do anything when I'm using it. Unlike most php frameworks, where I feel like I'm being constrained at one level that's been prechosen for me, no more, no less. It's really beautifully elegant in design.

      --
      Everything will be taken away from you.
    9. Re:Maybe we will see more Web by Alpha830RulZ · · Score: 1

      Django absolutely rocks. As does Python. I cut my teeth on Basic, moved to C and Cobol (yes, at the same time). I dabbled in C++, there was some VB time, and then on to Java, Perl and C#. With Python I feel like I have found the one true language. I've flirted with Ruby, but I like Python better.

      --
      I was taught to respect my elders. The trouble is, it's getting harder and harder to find some.
  3. Your flying! How? by slyn · · Score: 4, Funny

    Two oblig python links:

    Python @ xkcd

    and

    Python @ Bash.org

    HHSSSHSHSSS

  4. Who? by Anonymous Coward · · Score: 0

    Who?

  5. Bout Time by Anonymous Coward · · Score: 0

    Python is a great language.

    Obligatory XKCD comic: http://xkcd.com/353/

    I'm sure the python haters will be coming out of the woodwork soon though.

    1. Re:Bout Time by StevisF · · Score: 2, Insightful

      People don't hate Python. People hate the people who go around trolling discussion of every other programming language saying how much better Python is than the language being discussed.

    2. Re:Bout Time by Anonymous Coward · · Score: 0

      Speak for yourself. A python once ate my sister. I hate snakes of all types.

    3. Re:Bout Time by Anonymous Coward · · Score: 0

      Actually, Python is not named for the snake but for Monty Python.

    4. Re:Bout Time by krog · · Score: 4, Funny

      as is every fucking variable, subroutine name, and pun in every Python program, site and text

    5. Re:Bout Time by Anonymous Coward · · Score: 1, Funny

      And who were Monty Python named after? See? It's all a giant pro-snake conspiracy. Don't let them fool you, it's just like ASP, Microsoft's web scripting language.

    6. Re:Bout Time by Anonymous Coward · · Score: 0

      AMEN!

    7. Re:Bout Time by Anonymous Coward · · Score: 0

      People don't hate Python.

      Yes they do.

  6. Acceptance Speech by pembo13 · · Score: 3, Funny

    I would just like to say thank you as I accept this award on behalf of my fellow Python brothers. We all know that God created the universe with Python, but allowed the non believers to think that it was Perl or LISP so that they would not commit seppuku.

    --
    "Thanks for all the money you paid to us. We've used it to buy off ISO among other things" -Microsoft
    1. Re:Acceptance Speech by yaphadam097 · · Score: 1

      Only a ruby programmer would commit seppuku.

    2. Re:Acceptance Speech by mvdwege · · Score: 1

      Yeah, Cleopatra is more Python's style.

      But what would be Perl suicide? Let yourself be trampled by camels?

      Mart
      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    3. Re:Acceptance Speech by Anonymous+Brave+Guy · · Score: 2, Funny

      But what would be Perl suicide? Let yourself be trampled by camels?

      <obligatory> There's more than one way to do it! </obligatory>

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    4. Re:Acceptance Speech by SanityInAnarchy · · Score: 1

      The universe doesn't support threading? Or just runs on an immensely large, but single-core, CPU?

      --
      Don't thank God, thank a doctor!
    5. Re:Acceptance Speech by Anonymous Coward · · Score: 0

      Actually, it was LISP that God created the universe in. It's just that he created Python after perfecting Lisp, then realizing that it could be distilled into an easy to use syntax. Yeah, he had to cut some corners here and there (no CLOS), but overall, the results speak for themselves.

    6. Re:Acceptance Speech by StarfishOne · · Score: 1

      There is indeed such a thing as the GIL: God's Interpreter Lock. ;)

    7. Re:Acceptance Speech by FuzzyDaddy · · Score: 1

      THAT'S funny!

      --
      It's not wasting time, I'm educating myself.
  7. Re:Hmmm by the_B0fh · · Score: 3, Funny

    PHP and ActiveX over Python?

    Mamama!!!! Make the bad man go away, please.

  8. Re:Hmmm by reSonans · · Score: 5, Funny

    I'm hate python.

    Man, you take this stuff seriously. Changing your name is hardcore.

    --
    Light the blue touch-paper and retire immediately.
  9. Tried python by Jack9 · · Score: 1

    OPED:
    Wouldn't call it the year of Python since there's nothing special that's happened with Python this year. Heard a LOT more hype about Ruby (f that).
    Tried the twisted framework. Garbage.
    Frameworks can't be written successfully in a baby language like PHP, Python frameworks aren't gonna magically appear.

    I'll take PHP, Java for backend and Flex/Actionscript for frontend.

    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
    1. Re:Tried python by AlXtreme · · Score: 2

      Frameworks can't be written successfully in a baby language like PHP, Python frameworks aren't gonna magically appear.

      Like Django, perhaps?

      I'm with you on twisted; you nead to twist your head around it. Python has indeed had a relatively quiet year. Django on the other hand seems to be doing things just right and leaves the programmer with the final say in how he wants to structure his application. I've been using it for various projects over the last 1.5 years: it has never let me down and shortened development time considerably, leading to very happy clients.

      Given I charge by the hour, I might have to pick up Java to crank up those invoices...
      --
      This sig is intentionally left blank
    2. Re:Tried python by NewbieProgrammerMan · · Score: 1

      I'm with you on twisted; you nead to twist your head around it. ... Django on the other hand...

      As I understand it, Twisted is more of a framework for writing frameworks; it's not meant to provide the sort of higher-level stuff that people generally expect when they say "web framework." If I'm wrong about that, somebody please correct me.

      --
      [b.belong('us') for b in bases if b.owner() == 'you']
    3. Re:Tried python by AlXtreme · · Score: 1

      As I understand it, Twisted is more of a framework for writing frameworks; it's not meant to provide the sort of higher-level stuff that people generally expect when they say "web framework." If I'm wrong about that, somebody please correct me.

      Yes and no. I must admit having to look it up, as it has been a while I looked at twisted. Twisted provides a framework for networked applications, be them client-side or server-side. They have their own Web-oriented framework called TwistedWeb, which can be used to write a web-facing server. So yes, it's a (networking) framework with which you can write a framework, however not generally a 'web framework' like in the usual sense.

      If you want to make your own (web) server in python, Twisted is a valid choice. If you want to make a web application, Django is a valid choice. There is little overlap, besides the fact that they both are python libraries.
      --
      This sig is intentionally left blank
  10. Re:Hmmm by mysqlrocks · · Score: 3, Interesting

    PHP and ActiveX over Python?

    What's up with all the PHP haters on Slashdot? For building most web applications it's the place to be. Zend is working hard to increase the level of professionalism of the PHP community. I've recently started using Zend Framework and it's a really nice way to build web applications.

  11. TIOBE? by LMacG · · Score: 3, Funny

    I plugged that into Wikipedia and I got redirected to The Importance of Being Earnest.

    The linked page in the summary doesn't give any clues. Do we get to make up our own meanings? How about The Infernal Order of Bastard Evildoers? Seriously, who are these herpephilic people?

    --
    Slightly disreputable, albeit gregarious
    1. Re:TIOBE? by Drooling+Iguana · · Score: 2, Informative

      This Is One Big Earmuff.

      --
      ... I'm addicted to placebos
    2. Re:TIOBE? by Jugalator · · Score: 3, Informative
      It is short for The Importance of Being Earnest, and this is also shown on their company profile page.

      The name TIOBE stands for "The Importance Of Being Earnest". This is also the name of a comedy play written by Oscar Wilde at the end of the Nineteenth Century. By choosing this name, the founders of TIOBE Software emphasize their sincere and professional attitude towards customers, suppliers and colleagues.
      --
      Beware: In C++, your friends can see your privates!
    3. Re:TIOBE? by Deaney · · Score: 1

      Isn't it that guy from the Power Plant who can't speak English?

      --
      "I like my sex like my basketball, one on one with as little dribbling as possible." - Lt. Frank Drebin
    4. Re:TIOBE? by aevans · · Score: 1

      Except that the play is about a guy that lies about his identity (says his name is "Earnest", know what I mean?) to try to get laid. The moral of the story is, if he'd just been honest, he'd've got the girl

  12. Re:Hmmm by AmaDaden · · Score: 2, Insightful

    What's up with all the [your favorite programing language] haters on Slashdot?
    *sigh* Welcome to Slashdot....
  13. Lies, damned lies, and statistics by Haeleth · · Score: 4, Insightful

    It all depends how you count it. For example, here is a comparison based on available jobs that shows Perl still vastly in the lead, followed by PHP, with Python and Ruby both trailing by a long way. I'm sure there are other figures that prove that PHP is the biggest language, and yet others that show Ruby is growing fastest, etc. etc. etc.

    TIOBE's methodology is distinctly suspect, too. Looking at search engine result counts - which are estimates, and in the case of Google are well documented to be inaccurate - is hardly scientific. And they're using YouTube as one of their search engines?! How is that going to produce meaningful figures?

    (Yeah, I'm still bitter that ML is so unpopular. But you can't call me a Perl fanboy, because I dislike all "dynamic" programming languages equally, and program largely in C++ and OCaml.)

    1. Re:Lies, damned lies, and statistics by DragonWriter · · Score: 2, Insightful

      TIOBE's methodology is distinctly suspect, too. Looking at search engine result counts - which are estimates, and in the case of Google are well documented to be inaccurate - is hardly scientific. And they're using YouTube as one of their search engines?! How is that going to produce meaningful figures?


      Their measuring the popularity of language foo by "Programming foo" hits, with some special case modifications to deal with particular languages where that kind of query would be problematic. Its not at all a reliable metric, but among the quick-and-dirty language-comparison metrics, it doesn't seem to be notably bad (not, again, that its any good, just that whole pack is really bad and this seems no worse than average.)

      Using YouTube makes some sense given the kind of measure they are doing, since "Programming foo" screencasts that might be distributed via YouTube are as meaningful as the average "Programming foo" webpage.

      (I hate screencasts, personally, but that's a different issue.)
    2. Re:Lies, damned lies, and statistics by Dasher42 · · Score: 4, Interesting

      Not to argue that TIOBE's statistics aren't suspect, but the number of available jobs banging on Perl isn't meaningful to me. I've already had too many jobs where the first order of business is someone pointing me at a directory and saying, "These are your predecessor's Perl scripts. Please figure this out and make things work."

      The last time I had free rein in something like that, I did just that, and made a clean rewrite to make a few cleanly commented, consistent Python modules that did the work of all the previous scripts, sans bugs. Just the fact that assignment by reference is the default, that building data structures deeply requires no line noise, makes the program design easy to get right the first time. No "oops, need another dollar sign there". No "how do I refer to a value in a hash of lists of hashes again?" You just do it.

      Maybe it's that my sense of programming comes from years of looking at some of the cleaner C and C++ out there, and reading Design Patterns, makes me prefer a language that encourages design and clean coding practices by default. I don't want to deal with one more script from someone who munged strings of data with regular expressions where they should have used data structures or objects. Those of you who are about to clean up piles of Perl code with Perl Medic in hand, I salute you. You're braver than I care to be anymore.

    3. Re:Lies, damned lies, and statistics by chromatic · · Score: 1

      Not to argue that TIOBE's statistics aren't suspect, but the number of available jobs banging on Perl isn't meaningful to me.

      That's one component of popularity, however.

    4. Re:Lies, damned lies, and statistics by Just+Some+Guy · · Score: 1

      Just the fact that assignment by reference is the default, that building data structures deeply requires no line noise, makes the program design easy to get right the first time. No "oops, need another dollar sign there". No "how do I refer to a value in a hash of lists of hashes again?" You just do it.

      Yes, yes, yes. That was the exact issue that made me come to love Python. It's not that I can't make complex structures in Perl, but that every time I wanted to do anything non-trivial I had to reach for the camel book. And heaven help you if you wanted to change a function to return a hash of list of hashes instead of a scalar, because then you'd have to change the calling code's semantics for storing the results. Hard? No. Annoyingly pointless? Oh, yeah.

      I don't have anything against Perl. I just got tired of doing all the extra work that I had just assumed was a necessary evil until I saw otherwise.

      --
      Dewey, what part of this looks like authorities should be involved?
    5. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      A job looking for someone to come in and replace all of their Perl code with Python code is indicative of Perl's popularity?

    6. Re:Lies, damned lies, and statistics by chromatic · · Score: 1

      It would be possible to extrapolate that Python's gaining popularity relative to Perl over time as companies migrate Perl code to Python code, but the job statistics don't show a decline in Perl and corresponding gains in Python.

      Per my reading of the job trends, they prove that such a replacement is indeed not happening in significant volume.

    7. Re:Lies, damned lies, and statistics by mvdwege · · Score: 2
      And heaven help you if you wanted to change a function to return a hash of list of hashes instead of a scalar, because then you'd have to change the calling code's semantics for storing the results.

      Being somewhat conversant in both languages, I can't help but wonder how you would go about the same thing in Python. I mean, the difference between a single value and a dictionary of lists of dictionaries is just as big. If your function returns data in a certain format, and you change the format of the return value, you must adjust the calling code's semantics, there is no way around that. Unless you stick the data in a class and only use accessor functions to manipulate it, but that works in Perl just as well as in Python, and you're still stuck changing calling semantics, albeit in one place only this time.

      Mart
      --
      "I know I will be modded down for this": where's the option '-1, Asking for it'?
    8. Re:Lies, damned lies, and statistics by Just+Some+Guy · · Score: 1

      He probably doesn't even know Perl.

      That must be it.

      --
      Dewey, what part of this looks like authorities should be involved?
    9. Re:Lies, damned lies, and statistics by Sentry21 · · Score: 2

      Just the fact that assignment by reference is the default, that building data structures deeply requires no line noise, makes the program design easy to get right the first time. No "oops, need another dollar sign there". No "how do I refer to a value in a hash of lists of hashes again?" You just do it. This is definitely true, though your mention of assignment by reference reminded me of something.

      I was experimenting with writing an IRC bot in Python from the ground up, opening up a socket and sending data into it (no frameworks or anything). After a while, I got fed up with killing the bot and restarting it every time I wanted to test new code (and people were getting tired of it quitting and rejoining), so eventually I came up with a solution.

      I factored the bot class out into a separate module, and wrote a script that instantiated an object of the class, which then connected to the server, joined channels, etc. Then, I added functionality to the class to take all of its data structures (list of channels, list of users, and even the TCP socket itself) and pack them up into a dict, then return the dict. Finally, I added some code to import a dict and replace the data structures with the content of the dict, and then two or three lines of code to unload and reload the IRC bot module.

      The result? I now have an IRC bot written in Python which allows me to modify the code live, without restarting the bot. If I want to add a new function, or add support for another command (one of the myriad numeric commands that, at this point, keeps ending up in my console), I can add it and then simply !rehash in IRC, and the bot reloads its own code, swapping out the old for the new.

      Because objects are passed by reference, the socket itself moves from one instance to another, and the bot never has to disconnect. It was a rather ingenious hack, imho, was startlingly simple to implement, and was made possible by the amazing dynamicness of Python.

      Woo!
    10. Re:Lies, damned lies, and statistics by mr_mischief · · Score: 0, Flamebait

      "Oh, shit! I put four spaces where I meant a tab!"

      At least Perl's line noise is legible. You still have it in Python, but it's invisible. I know which I prefer. You know which you prefer.

      We don't need to bash each other's choices, but your language is not objectively superior because you spout anecdotes and personal preferences.

    11. Re:Lies, damned lies, and statistics by DavidNWelton · · Score: 2, Interesting

      Perfect stats are impossible. However, I think that even imperfect stats can give you a good glimpse of what's going on. This is my own attempt at doing so, which I think is a bit better than TIOBE's in that I track more things:

      http://www.langpop.com/

      Hopefully, I'll have trend data up there soon as well.

    12. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      "Oh, shit! I put four spaces where I meant a tab!" Well that was pretty dumb. Why isn't your editor using spaces for tabs?
    13. Re:Lies, damned lies, and statistics by krog · · Score: 1

      It leads me to wonder if Perl will be 2020's COBOL. No one likes to break running code...

    14. Re:Lies, damned lies, and statistics by krog · · Score: 0, Troll

      Wow, what an amazing story! Except that is very possible in basically any dynamic language worth half of two shits. In fact, I did exactly the same thing in a Perl IRC bot about two months ago; well, almost exactly the same. The difference is that in Perl we call a dict a hash. (Don't worry, Forth programmers will understand you just fine.)

      Anyway, all command handlers and message handlers were separated into two hashes, %CmdHandlers and %MsgHandlers, which could be reloaded on the fly. I even got away with keying the command handlers by their command code, so I could do something like $CmdHandlers{$cmd_code}->($message) and it Just Worked.

      I see so much "...and I never could have done it without Python!!" stuff that is 100% available in Perl, Ruby, JavaScript, Lua, Smalltalk, Lisp... Think of that. You're psyched over something that you could do on a mainframe 40 years ago, and you're willing to chalk it all up to Guido!

    15. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      A job looking for someone to come in and replace all of their Perl code with Python code

      The job wasn't to replace the Perl code with Python. The job was to work on the Perl code, but of course the Python fundie who can't tolerate the idea of other programming languages came along and just had to rewrite it.
    16. Re:Lies, damned lies, and statistics by Just+Some+Guy · · Score: 1

      Then, I added functionality to the class to take all of its data structures (list of channels, list of users, and even the TCP socket itself) and pack them up into a dict, then return the dict.

      Kudos for a slick hack! But here's how I might approach that:

      Create a class called "Settings" or similar. Change your bot class's __init__ method to accept a Settings object, like "def __init__(self, settings)". Then, change your code to refer to self.settings directly, such as replacing "self.socket" with "self.settings.socket". Once you do that, you can get rid of all the code that deals with saving and restore state, since all state will already be bundled into one convenient object.

      --
      Dewey, what part of this looks like authorities should be involved?
    17. Re:Lies, damned lies, and statistics by mr_mischief · · Score: 1

      Mine uses four spaces. How many does yours use? What about the guy sending me the next patch that's supposed to help my project? What about the guy who cleaned it up and sent it to him.

      The problem with the whitespace isn't that it's enforced as a coding standard. It's that it changes the meaning of the code. You could use brackets, parentheses, some other punctuation, or keywords to denote blocks and still enforce indentation in the parser. Then you'd be able to say Python enforces good style but a program could easily reformat code to your own standard whenever the whitespace got screwed up.

      Like I said, if you like Python, that's fine. I don't. It's not a bad language. It just has a quirk it picked up from ABC that I really don't care to mess with after having messed with it in ABC years ago.

      Perl has odd quirks, too, as do Ruby, C, Pascal, Smalltalk, Forth, and Lisp. Some people hate Lisp for its parentheses. Other people love it for the same reason. Some people hate Perl for all the abbreviations and punctuation characters, while other think that's a great strength. It's all about trading off what you want in a language to avoid things you don't. No language is perfect, including Python, and people seem to make a lot of software work despite that.

    18. Re:Lies, damned lies, and statistics by DragonWriter · · Score: 1

      I now have an IRC bot written in Python which allows me to modify the code live, without restarting the bot.
      .
      .
      .
      It was a rather ingenious hack, imho, was startlingly simple to implement, and was made possible by the amazing dynamicness of Python.


      Its a clever hack, but there is nothing really specific to Python about it. Lots of languages would let you do that: indeed, that's one of the things that I've seen raved about regarding the use of Lisp in, e.g., the space program. Certainly, Lisp/Scheme, Ruby, and Perl all support that kind of hack fairly naturally.

      If Python's the place where it clicked for you, that's great, but don't be misled to think that its unique or even part of some new breed in that respect.
    19. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      And of course the next guy after you looked at your directory of Python scripts, declared them hopeless, and rewrote them in something else, continuing the cycle.

      But seriously, it's hard to see how job listings are not a better indication of language popularity than search engine hits. Any fool can put up a blog that says "I tried Scala!" but it doesn't mean it's getting actual production use.

    20. Re:Lies, damned lies, and statistics by Nevyn · · Score: 1

      The last time I had free rein in something like that, I did just that, and made a clean rewrite to make a few cleanly commented, consistent Python modules that did the work of all the previous scripts, sans bugs.

      Sounds good, then someone can come in a few months/years from now and re-write in NBL because it's getting 100x as much data and now takes 3 weeks to process the data, using 500GB of RAM. Or because it's dumping pages of backtrace for a: missing file / an int() that should be a str() / misspelled word. Or just that noone can (under)stand the invisible syntax, so can't work with it.

      As someone who's worked a lot with both Perl and Python, I'd say the biggest differences are that Perl has had a lot more inexperienced developers writing code for it and that Perl has basically been unmaintained for like 8 years now. Oh and that Python developers think that their languages is the best, but Perl developers know their language used to be ;).

      --
      ustr: Managed string API with ave. 44% overhead over strdup(), for 0-20B
    21. Re:Lies, damned lies, and statistics by Dasher42 · · Score: 1

      In which case, a well-design prototype in a high level language is just part of the process. The alternative is premature optimization, and you know what they say about that.

    22. Re:Lies, damned lies, and statistics by Dasher42 · · Score: 1

      And of course the next guy after you looked at your directory of Python scripts, declared them hopeless, and rewrote them in something else, continuing the cycle.

      That could happen, but it wouldn't happen for any lack of making my code clearly readable, maintainable, and extendable by others. It comes down to good practice, and some languages accommodate it better than others. You can do anything in Perl that you can in Python. However, your cost in time and tedium will definitely be higher in most cases beyond the quick 100-line regular expression script.

    23. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      Perl has basically been unmaintained for like 8 years now

      WTF? Provide evidence or drown in your own shit.
    24. Re:Lies, damned lies, and statistics by ricegf · · Score: 1

      Perl has basically been unmaintained for like 8 years now
      Give or take 7 years and 11 months. Even a Python enthusiast like me knows that!
    25. Re:Lies, damned lies, and statistics by Reality+Master+201 · · Score: 1

      The whitespace block delimiter thing is one of those things that lets you know if someone's opinions about python are pulled entirely out of their ass or not.

      Yours clearly are.

    26. Re:Lies, damned lies, and statistics by Anonymous Coward · · Score: 0

      Funny how you still haven't answered the question, two days later.

    27. Re:Lies, damned lies, and statistics by ESqVIP · · Score: 1

      Their measuring the popularity of language foo by "Programming foo" hits, with some special case modifications to deal with particular languages where that kind of query would be problematic.

      I guess I found a name for my future language: "Help"

  14. Re:Hmmm by XorNand · · Score: 3, Insightful

    I can't quite figure out if you're a subtle troll or not? However, one of the biggest complaints about PHP programmers is that they're oblivious to a lot of important aspects of programing. Security being one of the biggies. Not being aware of the general criticisms of their chosen tools is another. (Which, if you're not a troll, you've proven my point.) I happen love Python, but I'm also aware of why many people don't like it.

    --
    Entrepreneur : (noun), French for "unemployed"
  15. Certainly Interesting by blueZhift · · Score: 1

    This is certainly interesting news. These days when I just need to script something fast, Python is definitely my tool of choice because it works everywhere that I do, and is easier, for me at least, to deal with than Perl. Though I still have a soft spot for Perl because it was the first programming language that actually earned me any money!

    1. Re:Certainly Interesting by Anonymous Coward · · Score: 0

      I looked into doing a re-write of my large project in Python about a year ago and decided it wasn't for me. While it's a nice looking language and there are some aspects of it that I like, the lack of community, libraries and other resources -- especially for web projects -- is decidedly limiting.

      In perl, I can find a hundred examples of how to do almost anything. I can probably find one or more packages (on CPAN, of course) that do what I need. And there are large established communities and resources to help you over hurdles.

      With Python, I found that you were often lucky if there was even *one* library that does what you need. Or that the way to do something was so obfuscated and the community so hidden or non-existent, that it was almost impossible how to figure out how to accomplish your goal. Nice language or not, these things pile up. And so, I remained with perl.

  16. Every task has a language/framework to fit it by mstahl · · Score: 4, Interesting

    PHP, Java for backend and Flex/Actionscript for frontend

    Them's fightin' words, sir!

    But seriously.... I've just gotten so tired of PHP in the past two years, and Ruby was such a great improvement to it. I used Python before PHP and my only complaint at the time was that it really was more trouble than it was worth at the time to write whole web applications in Python. You could, but languages like PHP were made for the web, so it got superseded. Once upon a time I wrote a few games in Python using PyGame and PyOpenGL though and had nothing but great experiences with that. I wouldn't call Ruby a cure-all, but it's pretty flexible and really pleasant to use for a wide variety of projects.

    That being said, I think that your post really misses the fact that for every task there's usually one or two programming languages or frameworks that would be "best" for that task. While PHP and Java may work as a backend for you, many of my projects are almost completely perfect for a Ruby on Rails implementation or specifically require functionality that exists nowhere else. Meanwhile Actionscript implies Flash, and I only have a couple of things brewing right now where Flash is even an option, much less advisable. I'm not trying to slam you here; I'm just saying that like anything else your mileage may vary.

    Also, python's supposedly getting tail recursion and some other tasty features soon. I might be tempted to pick it back up if it can surpass ruby in its efficiency that way.

  17. Build management: Switching from gmake to Python by Mark+Programmer · · Score: 4, Interesting

    especially beloved by system administrators and build managers.

    Absolutely. This year we replaced an old build system written in make with a (vastly superior) Python solution written from scratch. The replacement took one programmer about two weeks. The make system had taken two programmers a disgusting amount of time to build and support. What suprised me most upon completing the changeover was that the Python solution was faster than the gmake solution; since Python compiles to bytecode, re-running the build script was a quicker operation than gmake's re-parsing of the make files.

    Python's advantage as build glue is that it is just simple enough to be nearly shell scripting (write a simple wrapper, and you can pretty much just write shell script). But it has the features of a decent high-level language---including, most importantly, integrated documentation and a debugger. Anyone who doesn't understand why one would need a debugger for a build system hasn't yet written a build system complicated enough.

    Really though, this is less a statement in support of Python and more a statement against gmake. Make's age really shows as a build language, and if not for all the tools in the GNU world that depend upon / assume the existence of a make engine, I would encourage everyone to just toss the whole thing overboard and create all new build scripts in something else. You have better things to do with your time than reverse engineer code written in a nearly incomprehensible string-parsing language by someone who---in spite of the "standards" that have built up around make over the years---has gone off and done his own thing anyway. If you're going to have to deal with custom build code, you may as well own the challenge completely.

    --

    Take care,
    Mark

    There is a solution...

  18. Re:Hmmm by mysqlrocks · · Score: 4, Informative

    Not being aware of the general criticisms of their chosen tools is another. (Which, if you're not a troll, you've proven my point.)

    I'm not a troll, just wondering why there's so much bashing of PHP on Slashdot. I am aware of many of the criticisms of PHP. One of them you mentioned:

    However, one of the biggest complaints about PHP programmers is that they're oblivious to a lot of important aspects of programing.

    You'll see that I partly addressed that criticism with my "Zend is working hard to increase the level of professionalism of the PHP community" statement. I'm not going to go into a full length defense of PHP but if you are looking for such a defense I would suggest 10 PHP Myths Dispelled. I am not a PHP zealot, I just have a lot of experience with it and would prefer to build web applications using PHP over the alternatives that I've tried (Java/JSP, ASP.NET). I can't compare it to RoR or Python since I have tried neither. I've read about both and have seen nothing compelling to make me consider switching. I'm quite productive developing in PHP and am quite aware of both it's advantages and criticisms.

  19. tools for the task by Speare · · Score: 3, Interesting

    First off, let me say that I love both Perl 5 and Python 2.x and have used each of them on a wide diversity of projects. I've implemented my own OO system on top of each, I've used each for CGI, I've used each for AI, natural language processing, and game programming. Both languages have their idiosyncratic idioms and it's really annoying when you see a lot of C-ish code in either Perl or Python projects. It's also very possible to write ugly "write once" code in either one, don't be misled by the whitespace arguments: ugly code is about how you express (or fail to express) a problem and a solution.

    However, I have to say, pick the tool for the job. There are things that are more naturally expressed in Perl idioms than in Python idioms. There are things that are much more clear and direct about Python code for outsiders to read and understand. If I were doing a ton of regex text scanning work, Perl incorporates it into the language directly, whereas it's a bolt-on for most other languages. If I were doing a ton of object management, I like the compactness of Python's syntax over that of Perl's. Both have great extensibility but the available extensions and support can shape your choice for a given project. I wish Python had true equivalents to Perlmonks and CPAN; conversely I wish CPAN modules were more crisp and consistent, attributes I think I find in the community-written Python modules I've used.

    --
    [ .sig file not found ]
    1. Re:tools for the task by renoX · · Score: 1

      > pick the tool for the job.

      That's why Ruby is nice, it's as readable as Python but it has regex included (of course if you use overcomplicated regex in your code the readability will suffer, but that's not a language issue).

    2. Re:tools for the task by NewbieProgrammerMan · · Score: 1

      That's why Ruby is nice, it's as readable as Python but it has regex included...

      Just curious, are you talking about having to "import re" in Python instead of just having regex support by default, or is there something significant lacking in Python's regex support? (Not trolling, it's just nice to have some additional information about the differences in the languages)

      --
      [b.belong('us') for b in bases if b.owner() == 'you']
    3. Re:tools for the task by DragonWriter · · Score: 1

      That's why Ruby is nice, it's as readable as Python but it has regex included...


      Just curious, are you talking about having to "import re" in Python instead of just having regex support by default, or is there something significant lacking in Python's regex support?


      The need to import a library isn't a big deal, but Ruby's core support isn't just support functions "included by default", its also a simple literal syntax available and perl-style magic variables related to regexs. Now, I'm not too fond of the magic variables, but the magic variables are probably convenient to people coming from Perl, and the literal syntax is a convenience if you are using regexs a lot.

      So you can test a string against a regexp with something like:

      /pattern/ =~ string

      And get nil if there is no match, and the index of the start of the match if there is one. In Python, you get the same with something like:

      re.search(pattern, string).start


    4. Re:tools for the task by Anonymous Coward · · Score: 0

      Python comes with an OO system, and you're a damned liar

    5. Re:tools for the task by ricegf · · Score: 1

      I wish Python had true equivalents to... CPAN

      Just curious - in what way is the Cheeseshop not equivalent to CPAN? Not as many Python eggs as CPAN modules, of course, but otherwise I easy_install as easily as I ppm. Or maybe you mean something else?

  20. You don't change horses.. by sw155kn1f3 · · Score: 0, Troll

    Perl is de-facto standard and is going to stay this way forever. Python just can't surpass perl shell-like syntax and C-likeness.. Not gonna happen in any time soon.
    And we love it this way ;)

    --
    - Arwen, I'm your father, Agent Smith.
    - Well, you're just Smith, but my father is Aerosmith!
    1. Re:You don't change horses.. by Anonymous Coward · · Score: 0

      I'm not sure what the point of your post is. Python is a de facto standard, too. Furthermore, it doesn't want to have a shell-like syntax or C-likeness (wait, did you just say Perl is "C-like"? hahahahah). And we love it that way.

    2. Re:You don't change horses.. by ceoyoyo · · Score: 2, Funny

      Every Python programmer who reads that is going to shudder at the thought that Python might even try to surpass perl's shell-like syntax and C-likeness.

    3. Re:You don't change horses.. by risinganger · · Score: 1

      At the time of this reply I see the parent post has been modded funny. I'm not sure why - hell I'd mod this insightful.

    4. Re:You don't change horses.. by ceoyoyo · · Score: 1

      I should have put "including me" on the end. I'm still a little shaky.

    5. Re:You don't change horses.. by Anonymous+Brave+Guy · · Score: 2, Funny

      What the #!$% are you talking about?!

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    6. Re:You don't change horses.. by ceoyoyo · · Score: 1

      Could you be a little more specific about what you don't understand?

    7. Re:You don't change horses.. by Anonymous+Brave+Guy · · Score: 1

      Sorry. To steal someone else's explanation:

      -- Joke --->

           o
          /|\  <-- You
          / \

      (The symbols I used in the blanked word are all notorious line noise syntax in Perl.)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    8. Re:You don't change horses.. by macshit · · Score: 1

      What the #!$% are you talking about?!

      I guess that's the Perl version. Here's the python version:

      What the are you talking about?!

      Hope that turns out, whitespace has a tendency to get munged...

      --
      We live, as we dream -- alone....
    9. Re:You don't change horses.. by ceoyoyo · · Score: 1

      Oh, I was wondering if I missed an, uh, meta joke. Python programmer you see. When I come across line noise I check to make sure everything is plugged in properly and someone didn't turn on the microwave.

    10. Re:You don't change horses.. by Anonymous+Brave+Guy · · Score: 1

      Aw, shucks. I was all set to post the Python version for you, but tragically it seems someone already beat me to it. :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
  21. Questionable methodology by bn0p · · Score: 1

    TIOBE bases their ratings on the number of search engine queries for "<language> programming'. Maybe it's just me but I don't equate an increase in search engine queries regarding programming in python as indicating an increase in the popularity of python.

    Put another way, the number of people looking up information on a language X != the number of people programming in language X.


    Never let reality temper imagination

    --
    Never let reality temper imagination
    1. Re:Questionable methodology by rjames13 · · Score: 2, Insightful

      I never put "language programming" into a search engine I find "language library tutorial" is better. Of course that means I am learning "language" and "library". If I'm already programming in a specific language and know where the libraries documentation is then I have it bookmarked.

    2. Re:Questionable methodology by melonman · · Score: 1

      Maybe it's just me but I don't equate an increase in search engine queries regarding programming in python as indicating an increase in the popularity of python.

      Indeed. It probably tells you more about the randomness of the documentation. I almost never search for anything connected to perl using a generic search engine, since pretty much everything is on CPAN. OTOH, if your preferred language has a 'right-click' approach to modularisation (which seems to me to be the case with PHP), you spend all your time googling for the right bit of code to right-click.

      --
      Virtually serving coffee
  22. Just Say No! by Endymion · · Score: 2, Interesting

    Just say no to Bondage and Discipline Languages!

    ...any language where the author thinks lambda is "too confusing" and should be removed is doomed from the start.

    --
    Ce n'est pas une signature automatique.
  23. Reasons to love PYTHON! by zukinux · · Score: 0
    It's very easy scripting language

    OOP - Python is, if you want to use it this way, Object Oriented!

    It uses lots of POSIX standards, so if you ever did an OPEN call in-order to get fd, you have it here as-well :)

    Indents, makes the coder must use indents, which makes the code easier to read.

    Easy use in web-applications.

    Easy to use and learn, build classes for later use, and come with every popular Linux distribution today.

    Cross-platform, yeah, not all the functions, but most of them, which is good enough. Too bad that in Windows you have to install interpreter.

    I can think of hundreds of reasons why to use python, just learn it already :) I'm quite sure that in the next OS by MS or the one afterwards, they will release it with Python interpreter by default.

    1. Re:Reasons to love PYTHON! by Kymermosst · · Score: 1
      Indents, makes the coder must use indents, which makes the code easier to read.

      Not necessarily. Especially if the application used to view the code is not the same one that the code was written on.

      List of annoyances I have with regarding Python and white space:
      • You can't just send somebody some Python code in a medium that isn't whitespace-safe.
      • Indentation preferences vary among programmers, are arbitrary, and some people feel strongly about 4-space, 2 space, tabs, etc. Python uses this as a syntax element and forces everyone working on a particular file to share the same indentation scheme or risk breaking the code. In free-form languages, one guy who forgets to change his 4-space tab into actual spaces isn't going to break things.
      • You can't use brace-matching.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    2. Re:Reasons to love PYTHON! by jonaheffect · · Score: 1

      At least they require conformity to convention, and you don't get some script that the guy decided to make creative use of his whitespace. I think it really is more a feature (not to say all flaws are features)

      --
      Jump to high and you hit your head
    3. Re:Reasons to love PYTHON! by vrmlguy · · Score: 2, Insightful

      Indentation preferences vary among programmers, are arbitrary, and some people feel strongly about 4-space, 2 space, tabs, etc. Python uses this as a syntax element and forces everyone working on a particular file to share the same indentation scheme or risk breaking the code. Some of use view this as a good thing. ;-)

      Personally, I hate tabs. Every editor I use seems to have the tab-stops set differently, and looking at 4-space tab code in an 8-space tab editor is not my idea of fun.
      --
      Nothing for 6-digit uids?
    4. Re:Reasons to love PYTHON! by SanityInAnarchy · · Score: 2, Insightful

      You can't just send somebody some Python code in a medium that isn't whitespace-safe.

      What medium?

      Indentation preferences vary among programmers, are arbitrary, and some people feel strongly about 4-space, 2 space, tabs, etc. Python uses this as a syntax element and forces everyone working on a particular file to share the same indentation scheme or risk breaking the code. In free-form languages, one guy who forgets to change his 4-space tab into actual spaces isn't going to break things.

      That's actually a feature -- it forces everyone to agree on a standard there, and use it.

      If, for example, one guy uses tabs and one guy uses spaces, and the tab guy has his tabstop set to 2 or 4, while the spaces guy has left it at 8... well, stuff is going to look weird. Forcing everyone to the same convention is something you should be doing anyway, and I'd rather it happen automatically (by breaking stuff).

      --
      Don't thank God, thank a doctor!
    5. Re:Reasons to love PYTHON! by Kymermosst · · Score: 1

      What medium?

      This one, for instance, when you use the HTML formatted option.

      Here's some code for you, from here:

      (Yes, I used slashdot's ecode tag, which fails to preserve the leading spaces even though it is for inserting code snippets)

      #!/usr/local/bin/python

      import string, sys

      # If no arguments were given, print a helpful message
      if len(sys.argv)==1:
      print 'Usage: celsius temp1 temp2 ...'
      sys.exit(0)

      # Loop over the arguments
      for i in sys.argv[1:]:
      try:
      fahrenheit=float(string.atoi(i))
      except string.atoi_error:
      print repr(i), "not a numeric value"
      else:
      celsius=(fahrenheit-32)*5.0/9.0
      print '%i\260F = %i\260C' % (int(fahrenheit), int(celsius+.5))

      I am aware that the plain old text option mostly works nowadays, but there are sometimes problems with that as well. A few months ago, it was totally broken as well in this regard.

      Countless other forums out there have issues with preserving code formatting, not to mention some web-based chat systems where you might want to paste a code snippet.

      If, for example, one guy uses tabs and one guy uses spaces, and the tab guy has his tabstop set to 2 or 4, while the spaces guy has left it at 8... well, stuff is going to look weird. Forcing everyone to the same convention is something you should be doing anyway, and I'd rather it happen automatically (by breaking stuff).

      In languages that use delimiters as block and line markers, you can run a code beautifier to standardize the code, and even fix code that is horribly malformatted. If the white space gets screwed up really bad in a python program (line endings are deleted somehow), it will it not only fail to run, it will require a human to go in and unscrew it.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    6. Re:Reasons to love PYTHON! by Verte · · Score: 1

      You can't just send somebody some Python code in a medium that isn't whitespace-safe. True. I can only think of one example, HTML, and you can always programmatically insert non-breaking spaces in that case. You can do this efficiently in four lines of Python code, or a couple more in elisp when copying to the clipboard.

      Indentation preferences vary among programmers, are arbitrary, and some people feel strongly about 4-space, 2 space, tabs, etc. Python uses this as a syntax element and forces everyone working on a particular file to share the same indentation scheme or risk breaking the code. In free-form languages, one guy who forgets to change his 4-space tab into actual spaces isn't going to break things. That's why we have coding standards. The Python world settled upon 4-space indents a long time ago. If you're going to fly in the face of coding standards, expect to have to implement yet another four liner when you want to actually work with anyone.

      You can't use brace-matching. You aren't quite clear what you mean on this. If you mean you have no visual indication where a code block ends, you're a retard. Indentation is far easier to vgrep than braces. If you mean you have to think differently to write Python code programmatically, well yes, you do. Thankfully, there are simple libraries that do most of the work for you.
      --
      We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
    7. Re:Reasons to love PYTHON! by Sentry21 · · Score: 1

      True. I can only think of one example, HTML, and you can always programmatically insert non-breaking spaces in that case. You can do this efficiently in four lines of Python code, or a couple more in elisp when copying to the clipboard. Or wrap it in <pre>...</pre> tags
    8. Re:Reasons to love PYTHON! by SanityInAnarchy · · Score: 2, Informative

      It's worth mentioning that, at least in IRC, this is the preferred medium. It should work elsewhere, too, and there are scripts to assist in it.

      Your point is valid, but I don't believe I should constrain the format of a language because it won't work in some mediums. Should I not include []-bracketed arrays because bbcode might hate them?

      In languages that use delimiters as block and line markers, you can run a code beautifier to standardize the code, and even fix code that is horribly malformatted. If the white space gets screwed up really bad in a python program (line endings are deleted somehow), it will it not only fail to run, it will require a human to go in and unscrew it.

      Ah, but if the whitespace gets screwed up in a python program, that's equivalent to the bracketing getting screwed up in a C-style program. So the difference is that broken whitespace is not the domain of a code beautifier in Python, anymore than brackets and parentheses are the domain of a code beautifier in just about any language.

      Also, code beautifiers are still going to leave some things out of place, particularly comments which are spaced to match the code.

      --
      Don't thank God, thank a doctor!
    9. Re:Reasons to love PYTHON! by DragonWriter · · Score: 1

      The good think about having brackets as syntax and whitespace as formatting is that it is redundant, and mismatches between them may provide a way of catching thinkos. And it helps (in properly formatted code) readability: there is a reason natural languages tend to have quite a bit of redundancy, it aids comprehension.

      The bad think about having brackets as syntax and whitespace as just formatting is that it is redundant, and you can produce things that look wrong but are wrong but look right if you don't have something automatically formatting.

      Many programming languages lean toward the first factor outweighing the second. Python leans the other way. It isn't objectively one way or the other; which factor is a bigger factor in usability varies from person to person, and group to group.

    10. Re:Reasons to love PYTHON! by Kymermosst · · Score: 1

      You aren't quite clear what you mean on this. If you mean you have no visual indication where a code block ends, you're a retard. Indentation is far easier to vgrep than braces. If you mean you have to think differently to write Python code programmatically, well yes, you do. Thankfully, there are simple libraries that do most of the work for you.

      For any machine-assisted use in general (yes, indentation is easy to use with a human brain, that's why almost everyone does it even in languages that don't enforce it). Here is an example: in an editor I use, when I close a block in a language that is similar to C syntax, it automatically flashes me for .5 seconds the context of the opening brace of the block, even if it is off the screen. I like this feature, though I am not entirely sure why.

      The editor has no clue that you are ending a block in Python merely because you back-tabbed. You could just be adding a blank line.

      Please understand that I don't dislike Python. I'm just pointing out my annoyance with white space as a syntax element.

      --
      "Alcohol, Tobacco, Firearms, and Explosives" should be a convenience store, not a government agency.
    11. Re:Reasons to love PYTHON! by Anonymous Coward · · Score: 0

      Natural languages have huge massive piles of both redundancy and FEC. In spoken language we add further layers of emphasis and body language to help convey information. Often some of these layers contradict either accidentally or for effect, the listener is expected to parse through and recognize the intention of the speaker. Computers just aren't smart enough. We must instruct them as we instruct small children, specifically and unambiguously.

      Any redundancy in a programming language is a design flaw. One of the redundant portions is 'real' and the other is typically a convention. When the convention is easier to track and follow than the 'real' the design flaw is most obvious. For example we use whitespace in every modern language to show how the structure nests. Any language that also uses symbols to indicate the 'real' is fundamentally flawed. While Python is far from perfect and has plenty of warts its use of whitespace is the correct choice.

    12. Re:Reasons to love PYTHON! by Anonymous Coward · · Score: 0

      Sounds more like an annoyance with your text editor.

    13. Re:Reasons to love PYTHON! by DragonWriter · · Score: 1

      Any redundancy in a programming language is a design flaw.


      Perhaps. But we're really not discussing redundancy in a programming language, we are talking about redundant information in source code. There certainly is the point of view that any redundancy in source code is a "design flaw" (the theory that advocates that code should speak for itself and comments should not be used, as well as the theory beyond Python's whitespace handling, is an example of that.)

      One of the redundant portions is 'real' and the other is typically a convention.


      Convention is not a feature of the programming language, it is a feature of programming style (similar to conventions) that is irrelevant to the computer processing the source code but intended as an aid to the human reader. To a certain degree (certainly, where it comes to indentation and related formatting conventions) such convention can, in fact, be automatically imposed on code not written to the convention by automated tools. It is no more a language feature than syntax highlighting done by an editor is a feature of the language.

      When the convention is easier to track and follow than the 'real' the design flaw is most obvious.


      Since the convention is imposed on code for human readability and can be changed without changing the meaning of the code (just as syntax highlighting can be), I disagree. Indeed, the convention is entirely irrelevant to the design of the language, not a flaw in its design.

      For example we use whitespace in every modern language to show how the structure nests.


      More accurately, "it is common for people to use a whitespace arrangement that suits their personal tastes and those of their group to show how structure nests in most modern languages."

      Any language that also uses symbols to indicate the 'real' is fundamentally flawed.


      If its not "real" but convention the relation of whitespace to structure is not part of the language, any more than a conventional arrangement of comments to indicate function preconditions and return types is. If its not part of the language, it clearly can't be a flaw in the language.

      While Python is far from perfect and has plenty of warts its use of whitespace is the correct choice.


      No, its not the correct choice. It is a valid choice, and it aims to implement one subjective ideal of programming languages. Personally, I think that if you are going to use that ideal, though, it would be better to enforce a strict and consistent standard at the language level (e.g., "each new block level is indented by four spaces from the previous level") rather than "whatever mix of space and tabs you prefer, but each tab will be treated as if it were 8 spaces", so I wouldn't even say Python has a particularly well-chosen approach even given the guiding principal it has chosen, much less the one-true-correct choice.

    14. Re:Reasons to love PYTHON! by Verte · · Score: 1

      The simple solution is to leave your tabs on a blank line :) I'd believed that an indented block after a blank line was a syntax error- that back-tabbing always closed the block, except when in a parenthesized expression (it does in the REPL). It's probably better for your editor to scream at the practice, not that it helps with code that someone else has written.

      --
      We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
    15. Re:Reasons to love PYTHON! by ricegf · · Score: 1

      ...it automatically flashes me for .5 seconds the context of the opening brace of the block, even if it is off the screen. I like this feature, though I am not entirely sure why.

      I'm suspicious that you like it because it allows you to quickly check whether your indentation matches your braces That's why *I* like it, at least. Except when I'm writing Python, of course. ;-)

    16. Re:Reasons to love PYTHON! by Anonymous Coward · · Score: 0

      The parser only cares about whitespace to the left of text. I don't know of any programming language whitespace is necessary (unless you coded something very strangely that relies on it) -- sounds pretty dangerous to me. I normally just delete trailing whitespace. Vim, for instance, usually does that automatically for me.

      (As I understand it, the parser just ignores lines that don't contain any non-whitespace characters. So even a triple-quoted block can have blank lines containing random whitespace, to no ill effect.)

    17. Re:Reasons to love PYTHON! by SanityInAnarchy · · Score: 1

      mismatches between them may provide a way of catching thinkos

      I kind of doubt that, if you're using something which formats automatically. Even vim can autoindent, which reduces them back to useless redundancy.

      And it helps (in properly formatted code) readability

      I'd debate that. I find Python plenty readable.

      There is one feature I'd miss: bouncing between matching brackets in vim.

      The bad think about having brackets as syntax and whitespace as just formatting is that it is redundant, and you can produce things that look wrong but are wrong but look right if you don't have something automatically formatting.

      Right. And if you do have something automatically formatting, I just don't see how the extra curlies make a difference (except bouncing in vim).

      Personally, it's a moot point for me -- there are too many other big things wrong with Python (the GIL comes to mind) for the whitespace to make much difference.

      --
      Don't thank God, thank a doctor!
    18. Re:Reasons to love PYTHON! by DragonWriter · · Score: 1

      I kind of doubt that, if you're using something which formats automatically. Even vim can autoindent, which reduces them back to useless redundancy.


      I think that really depends on the degree of automatic formatting applied; I think at the default levels in most editors, there remains some utility. But, ultimately, a lot of this is a matter of taste, not right and wrong. What's useless or even bothersome to one person is a big readability aid to another, and just neither good nor bad to yet another.

      Personally, it's a moot point for me -- there are too many other big things wrong with Python (the GIL comes to mind) for the whitespace to make much difference.


      While I don't necessarily think the GIL is "wrong" in some kind of universal sense (its clearly a compromise, though), I agree that whitespace is a minor issues compared to most of the differences between Python and almost any other language, even generally similar dynamic scripting languages like Perl and Ruby.

  24. Re:Hmmm by nuzak · · Score: 1

    > Zend is working hard to increase the level of professionalism of the PHP community.

    I'd be satisfied if they just worked to improve the damn language.

    no_i_really_mean_it_mysql_really_escape_strings()

    --
    Done with slashdot, done with nerds, getting a life.
  25. Re:Hmmm by mysqlrocks · · Score: 2, Informative

    Technically you're talking about the available functions, not the "language" itself. But, semantics aside, I would argue that your complaint is being addressed. The Zend Framework I linked to and the SPL are PHP class libraries that you can use if you would prefer to work with PHP in OO way and (for the most part) forget about calling PHP functions outside of a class or object context.

  26. Re:Hmmm by Anonymous Coward · · Score: 1, Informative

    http://uk.php.net/create_function

    And if you can't see what's wrong with that (especially if you think it's comparable to anonymous functions in Lisp, Ruby, Haskell, etc etc), you need to go boil yourself in oil.

  27. Re:Build management: Switching from gmake to Pytho by Anonymous Coward · · Score: 1, Informative

    This year we replaced an old build system written in make with a (vastly superior) Python solution written from scratch.
    From scratch? You might want to give scons a try; it's a popular make replacement written and scripted in Python.
  28. Re:Build management: Switching from gmake to Pytho by Mark+Programmer · · Score: 1

    We looked into it, and scons is very good. The reason we didn't use it is because, ironically, it's too powerful (and relatedly complicated)---it gives a nifty complexity-for-power tradeoff that we simply decided we didn't want to leverage. Since we already knew exactly what we wanted our make process to do, we found it faster and easier to just write the Python script we wanted than to figure out the "scons way" to do things. Dependency management is a good example: scons offers automatic dependency walking, but we already had explicit dependency lists that we were comfortable updating, and didn't want to take the time to learn enough about the scons dependency walker to trust it.

    If we'd been writing a make process on a brand new project, reading up on scons and understanding the structure it places upon your build process would have been a better choice. As it stands, we had a very specific plan, we could see it fairly clearly in "straight-line" python, and the instant scons's requirements got in the way we tossed it overboard and forged ahead.

    --

    Take care,
    Mark

    There is a solution...

  29. Re:Hmmm by DragonWriter · · Score: 2

    What's up with all the PHP haters on Slashdot?


    I tried PHP out for a while a couple years ago. Quite a lot of useful libraries, but the language itself didn't seem to offer much. For just gluing together the existing libraries with minimal new code, it seemed to quite usable (and a lot of web development might get by with that), but it seemed a lot less nice when there was more processing involved. Maybe I just didn't get it, or maybe its improved since then...

    For building most web applications it's the place to be.


    Why? Sure, it featured neat embedding in HTML before there were Python or Ruby templating engines that used Python or Ruby in HTML, but why would it be preferred now, for a new, ground-up web application, besides familiarity to the developer? (I'm not trying to be argumentative, just looking for perspectives on "why PHP?")

  30. You, Sir, are stupido. by Qbertino · · Score: 1

    That obscure link you posted claims "bondage and discipline" languages to be lacking compared to opposing (and superiour) Languages of Choice. The latter to which the author of this strange theory counts Python. Duh.

    I'd say your plan to get all smart-assy on Python backfired big time.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:You, Sir, are stupido. by Endymion · · Score: 0

      what, you think I haven't read the jargon file?

      Of course python counts as an entry for "languages of choice" as that's how the jargon is used. Evidence: this thread. Many people consider it a choice language, so the jargon fits.

      That doesn't mean they are correct, though. Python is all about forcing you into a specific style of programming, and a pretty basic one at that. The fact that the designer thinks many important programming concepts are confusing is hilarious. The fact that he forces others down to his level by limiting how you can program in python is sad, at best.

      And I'm not EVEN going to talk about whitespace.

      --
      Ce n'est pas une signature automatique.
    2. Re:You, Sir, are stupido. by tuffy · · Score: 1

      Except that he isn't limiting how you can program in Python. lambdas are still in Python 3 if you really want to use them. But for most applications of lambda in Python, list comprehensions are superior. They're not only easier to read, but also provide better performance.

      Considering the vast gulf of language flexibility between Python and actual "bondage and discipline" languages such as Pascal or OCaml, the notion it should be counted among them is difficult to take seriously.

      --

      Ita erat quando hic adveni.

  31. Why choose? by bgibby9 · · Score: 1

    Every language has something to offer, something that it does better than others. The point is, choose your language based upon what the problem you are faced rather than the "popularity" of that language. Besides, Perl will never die, it will only sit and collect the programmers who jump from every other language q:)

    --
    http://www.gibby.net.au
    1. Re:Why choose? by mr_mischief · · Score: 1

      I disagree. Show me one thing RGP/400 does better than another language. ;-)

    2. Re:Why choose? by mr_mischief · · Score: 1

      Damn fat fingers. I meant RPG/400. Or COBOL for that matter.

    3. Re:Why choose? by Anonymous Coward · · Score: 0

      COBOL lets me charge more for 'legacy systems'

    4. Re:Why choose? by mr_mischief · · Score: 1

      Sure, but not as much as 360 JCL or 360 assembly, right? How about Bliss or FORTRAN IV (if you can find them)?

  32. Re:Build management: Switching from gmake to Pytho by SanityInAnarchy · · Score: 1

    re-running the build script was a quicker operation than gmake's re-parsing of the make files.

    Erm, make files? Plural? Well, there's your problem...

    I forget where, but there is a paper somewhere on the dangers of recursive make, advocating a single makefile instead (with a few includes). And they have a point.

    I'm all for replacing Make, but performance isn't the reason.

    --
    Don't thank God, thank a doctor!
  33. What are the chances? by uniquename72 · · Score: 0, Troll

    First 2007 was the Year of the Linux Desktop, and now THIS??

    What a great year!

  34. Re:Build management: Switching from gmake to Pytho by GrievousMistake · · Score: 2, Interesting

    Really? One of the problems I've had with Python is how hard it is to use it as a shell scripting language. Namely, the functions for browsing and manipulating the file system are low-level, OO-hostile, quirky, and scattered seemingly almost randomly between os, os.path and shutil. I find them so unwieldy I'll sometimes just cheat and call .bat files from Python to operate on files.
    Apparently some people even have it as their CLI of choice, so I may be missing something, but I've been unable to pry out of them what the secret is.

    --
    In a fair world, refrigerators would make electricity.
  35. double stupido by Verte · · Score: 1

    What are you talking about? A handful of idiomatic lambda uses have largely been replaced, sure, but lambda is still pretty common in Python code.

    --
    We at slashdot are scientists, specialists and kernel hackers. Your FUD will be found out.
  36. All languages are bashed on /. by Qbertino · · Score: 3, Insightful

    Sure there is PHP bashing, as is bashing of many other PLs. Just watch a Lisp or C guy go after Java to see what I mean.

    The truth is, the people that really are programming and solving problems rarely rant about a PL without having tried it. PHP is an extremely n00by-friendly programming language - also because of it's wide availability - and thus lots of code in PHP is quite wacky actually. This falls back on to the PL itself. Flash/ActionScript has simular problems (aside from having a strong prorpietary touch to it).

    In the end PHP, with its neighbourhood to markup, is the web-eras basic. With way more succesfull and impacting open-source web applications than any other solution - Python included.

    I *am* a Python fan, but it just didn't have that critical mass of an install base back then when mod_php gained traction. And that the true King and ruler of all webkits, Zope, has had a backend that looks like shit for 7 years now didn't help it either. Nowadays nobody gives a hoot if Zope is lightyears ahead of Rails and a few years older - it's just a niche webkit for people who've bumped into it

    There are a lot of factors that make a language successfull, and PHP meets very many of those. Just because people rant about it doesn't mean it really is bad. Nobody I know would say that programming in C is really fun and modern and hip. And many people rant about it. Yet look how many mission critical work still is done with it - because the untested alternatives aren't any better.

    On the server-side I've been mostly doing PHP for last 3 years now and am now going totally OOP with the CakePHP Framework and a large international project. It works, is extremely neat and quick to develop with. So be it that PHP has a few bizarly named core functions and arrow->syntax. So *fucking* what? My friend who has a business aswell and is a Sun partner and Java fanboy just moved his webproject from Java to PHP so they could finish it faster.
    "Java Fanboy speeds up project by switching to PHP" - enough said.

    Slashdotters rant a lot, but reality is allways a tad different.

    --
    We suffer more in our imagination than in reality. - Seneca
  37. Re:Hmmm by mr_mischief · · Score: 1

    The main library of functions in the core namespace along with the syntax rules for the language pretty much are the language. Having an extensible language with multiple namespaces is a much cleaner alternative to lumping so much into the core. That's the complaint.

    There are people who use PHP with proper modularization, but most of what people see isn't done that way. In a language that's largely used for Open Source software, the state of the code in those OSS projects will be what the language is based on, fair or not.

  38. Did you try BitBake? by Anonymous Coward · · Score: 0

    Did you consider BitBake? http://developer.berlios.de/projects/bitbake

    It's not as ambitious as SCons.

    It's part of the build framework for Open Embedded Linux - http://developer.berlios.de/projects/bitbake/

    Its metadata repository takes care of keeping track of all the different ways to build things on different hardware.

  39. Re:Build management: Switching from gmake to Pytho by TheLink · · Score: 1

    How do you manage a single makefile for a project that has a fair number of people doing their own different modules (doing their own submodules etc)?

    Some of the modules don't need makefiles either.

    Those modules are to be packaged in their own separate packages (RPM or whatever).

    In the end it just seemed easier to let people handle their own makefiles (with certain limits) for their stuff, assuming of course if makefiles are necessary.

    The last I checked FreeBSD used to use some perl scripts to help build its stuff.

    --
  40. Re:Build management: Switching from gmake to Pytho by SanityInAnarchy · · Score: 1

    I'd have to find the article, but it does discuss all of these things. (Not RPM by name, but...)

    I'm not advocating makefiles, just saying that the complaint of performance, in particular, isn't relevant.

    (Oh, and you can always have different files -- include files and such. But including them is fundamentally different than a recursive make.)

    --
    Don't thank God, thank a doctor!
  41. Recursive Make Considered Harmful? by Sits · · Score: 1
    1. Re:Recursive Make Considered Harmful? by SanityInAnarchy · · Score: 1

      Yes, that's it. Thanks.

      --
      Don't thank God, thank a doctor!
  42. Perl's Inline regex syntax by Sits · · Score: 1

    It's not that you can't do the same regexs in Python. It's that the syntax for doing is different and more OOPy in Python. man perlre and look at how Perl uses them...

    1. Re:Perl's Inline regex syntax by Black+Perl · · Score: 1

      Yes, but the syntax alone doesn't make something more "OOPy". For example, in Ruby the expression

      "String" =~ /ring/

      is completely OO: it is calling a method named '=~' on a string with a Regexp object as its argument. It's as if you had typed:

      "String".=~(Regexp.new('ring'))

      except syntactic sugar makes it simpler. Of course '=~' is a strange method name and it is only used to make the "sugared" version look like an operator. Nobody would write code like that. But you might see:

      "String".match(/ring/)

      In Ruby, matching is a commutative operation so you can reverse it. /ring/.match("String")

      or /ring/ =~ "String"

      Ruby has built-in syntactic sugar for several methods (even '=' (equals) is a method). But this is the best (or worst, depending on your point of view) example of having so many ways to do something.

      --
      bp
  43. Cute but by Anonymous Coward · · Score: 0

    PHP is a better web templating language then python. Given a free choice in selecting the best tool for the job, I'd favor awk, bash, erlang, haxe, javascript, lua, perl, php, pike, ruby or scheme (as appropriate). I'm fluent in some of these; I can get by in all.

    Python people are pushing it as the ultimate scripting solution, we already have a scripting language like that - perl ;) lua makes a smaller, faster extension language and ruby wins the "nice to work in" prize. It's probably better for larger web apps than PHP, not so good as perl, haxe or erlang IMO. As for python as a client-side scripting language to replace javascript... whitespace much?

    What exactly is pythons forte? Everywhere I look, it makes for a bad choice.

    1. Re:Cute but by ricegf · · Score: 1
      AC said:

      What exactly is pythons forte? Everywhere I look, it makes for a bad choice.
      TFA said:

      a 58% surge in its popularity rating during the year
      Young Indiana Jones said:

      Everybody's lost but me!
  44. Re:Build management: Switching from gmake to Pytho by Chris_Jefferson · · Score: 1

    Do you know of a good guide to using Python as a replacement for bash shell scripts? Lots of people seem to use it for this purpose, and I was interested in finding a nice guide to learning how to do this.

    --
    Combination - fun iPhone puzzling
  45. Re:Hmmm by mysqlrocks · · Score: 1

    Why? Sure, it featured neat embedding in HTML before there were Python or Ruby templating engines that used Python or Ruby in HTML, but why would it be preferred now, for a new, ground-up web application, besides familiarity to the developer? (I'm not trying to be argumentative, just looking for perspectives on "why PHP?")

    A few of the reasons:

    • proven scalability (Wikipedia, Yahoo!) - this is partly due to the "share nothing architecture"
    • great frameworks available (Zend Framework, CakePHP, Symfony)
    • lots of developers (and on the flip side, lots of jobs) - you could argue this is related to "familiarity to the developer" but from a practical point-of-view it is important
    • hosting is easy to find/setup
  46. MMO written in Python. by splutty · · Score: 1

    Now here's something probably most of you don't know :) Eve Online (The Space MMO from CCP) (You know, the one people seem to love bashing) is actually written in Python.

    First time I realized that was about 3 days after installing the game and seeing all kinds of familiar extensions in cache and library directories. Fun stuff :) An actual game written in a language that's derived from a language that was originally designed for games.

    --
    Coz eternity my friend, is a long *ing time.
    1. Re:MMO written in Python. by swx · · Score: 1

      The engine used for Eve Online was written in C++. Most games now use scripting languages to do some of the gameplay elements.

  47. Re:Build management: Switching from gmake to Pytho by Anonymous Coward · · Score: 0

    Do you seriously think your speed up was do to the fact that you don't have to parse a makefile each time??? That time is going to be overwhelmed by your compile times. I doubt your speed up was do to Python being compiled.

  48. Tabs by Tablizer · · Score: 1

    They also assert that Python has become the "defacto glue language," being "especially beloved by system administrators and build managers."

    This does not make sense because of the space/tab difference between different editors and Python's sensitivity to tab-to-space conversion because it uses indentation to determine blocking levels. A glue language should be friendly to ANY text editor that happens to be around, not just those adjusted for Python-friendly spacing.

    1. Re:Tabs by Eivind+Eklund · · Score: 1
      I don't program in Python, yet I don't see the tab differences as being a common problem for system administrators: In my experience, few system administrators are dumb enough to adjust tab size from the default 8. Programmers often do, because they often work so much in a text editor centered at a single place (their primary development machine) that funky adjustments are reasonable; system administrators don't, as they usually work on many different machines.

      Eivind.

      --
      Doubting the existence of evolution is like doubting the existence of China: It just shows that you're uninformed.
  49. Re:Hmmm by Fujisawa+Sensei · · Score: 1

    I'm not a troll, just wondering why there's so much bashing of PHP on Slashdot. I am aware of many of the criticisms of PHP.

    I wouldn't class myself as a php hater; but sometimes it seems like most of the php apps out there are tied to MySQL, which I dislike.

    --
    If someone is passing you on the right, you are an asshole for driving in the wrong lane.
  50. been said but ... by Anonymous Coward · · Score: 0

    With all these new fangled languages coming out, pardon the cliche, but where are my f'ing flying cars? We got Ruby, Rails, Python, Parrot, AJAX, Javascript, C#, .net, Silverlight, and a billion or two "frameworks", Java, Swing, Beans, etc, blah blah blah ... yet we're still basically doing the same websites/applications over and over again.

    I don't see anything on most websites that couldn't be accomplished with a bit of Perl or C. At what point will people stop inventing derivative APIs and languages, and actually sit down and do something.

    To put this in perspective, it'd be like getting excited about the new 2008 model of lawn rakes. Ok that's a bit far fetched, it's more like getting excited about subtle variations of say the English language. The new derivations are no better than the previous, they're just "new" and therefore a "must have." I'd expect that with all these new development platforms that they would at least offer things that are drastically different from one another.

  51. originally designed for games? by Reality+Master+201 · · Score: 1

    Python was written to be the scripting language for Amoeba (a research operating system developed in the Netherlands).

  52. Re:Build management: Switching from gmake to Pytho by Mark+Programmer · · Score: 1

    Our source-compile times were much larger than our make parsing times, but in the common case (where there was a single file to re-compile), the several seconds of delay that were added by all of the Makefile rules reporting in that they had nothing to do were noticeable. It's possible that this was not due to parsing the makefile but instead due to the need to complete the dependency evaluation, but if that were the case I don't understand why we saw such a significant speed-boost when we went to Python.

    But I don't really have enough hard evidence to lay the blame at the fault of gmake's parser. It is more accurate to say "When we re-wrote the build scripts in Python, running them on an already-built (or nearly-built) project was notably faster than running the gmake scripts on an already-built (or nearly-built) project." It is possible that this was due to some other element of the end-to-end process (such as the way the different systems access files or query the OS for file metadata).

    --

    Take care,
    Mark

    There is a solution...

  53. Re:Hmmm by aphor · · Score: 1

    For me, vehement PHP basher, it isn't the language specification. It has more to do with 90% of the PHP code I encounter which gleefully intermingles presentation logic with functional application logic, abuses cut and paste, and generally demonstrates blatant disregard for readability.

    I have seen a little PHP that is written more like a bunch of page templates with external modular core logic. There just seems to be a bias towards rickety code in PHP. I fully acknowledge that I must seriously fear those programmers whom might abandon PHP for Python without adopting 'Pythonic' code idioms.

    I personally have a problem with Python's list comprehension. I totally abuse nested list comprehensions. They are difficult to follow mentally. I must constantly restrain myself.

    --
    --- Nothing clever here: move along now...
  54. Re:Hmmm by binford2k · · Score: 1

    I'll bite. Please explain what's so terrible about it.

  55. IBM's fault? by CanadaIsCold · · Score: 1

    I've worked with a number of IBM products this year that use Python embedded into them for various things. For example, WebSphere switched to python for it's internal configuration language. This finally replaced TCL. Is increased exposure by using this in various products increasing the popularity?

    --
    This signature would be better if I was creative.
  56. Finally a great language is recognized by ellisbright · · Score: 1
    I had to spend a lot of time a couple years back deciding on a scripting language to use for enabling user defined event based scripting on a major piece of software. In the end, we all unamimously decided on python. Yes, we reviewed ruby, ecmascript and php. But when keeping in mind the ultimate goal was to let amateur pseudo programmers do customized stuff, the decision was an easy one. Python is IMHO one of the most natural feeling languages I've come a cross in a long while. Sure, php is tag based and fits naturally on web pages - but how readable is it? It wasn't even runner up - which by the way was ECMA script. The reason for javascript should be obvious - all web browsers use it. But it is even more difficult and verbose to write in than php. Python feel natural, ends up super readable (completely opposite of perl). So what if it lacks some really geeky constructs that most people don't understand and can't appreciate. So if you point is to empower non-programmers to do something - then python is something to seriously think about. The time is coming where more and more average joes are going to want to script something and when that day comes, the most understandable language will win.

    Also don't forget about Jython which may be one of the best glue languages for java and we all know there is a LOT of java out there needing to be glued together!

  57. Re:Build management: Switching from gmake to Pytho by costas · · Score: 1

    You're absolutely right, file manipulation is a wart in Python. Thankfully, there's the path module, a good idea done well (and which should be in the stdlib!).

  58. Re:Build management: Switching from gmake to Pytho by costas · · Score: 1

    I was in the same boat, and made the same choice. Scons is very good (it rocks for C/C++ projects for example), but for custom build systems is way too complicated. I wish there was a "skin" you could use over Scons to build custom systems w/o delving into Scons internals unless you really, really have to.