Hacker News new | past | comments | ask | show | jobs | submit login
Python is One of the Most Popular Programming Languages (infernodevelopment.com)
17 points by octopus on Feb 19, 2011 | hide | past | favorite | 16 comments



Here's a link to the "article", instead of to a random comment:

http://www.infernodevelopment.com/python-becoming-most-popul...


Please, can the original poster edit the link? It really doesn't make sense to link to an anchor in the template section.


It's true (and it's great news) that Python is becoming one of the most important and popular programming languages, but this article does a pretty poor job at showing this and explaining why.

Other than Python's popularity for web development (where it faces competition from Ruby and PHP) Python has been adopted in many other settings, and that probably contributed quite a lot to the numbers indexed. For example, in the last year many of the biggest financial institutions have moved to developing critical parts of their systems in Python. In fact, it can probably be said that Python became popular _despite_ not becoming very popular for web development until quite late in the game.


I doubt I'm the only one but I really don't like python.

Python makes simple things hard. It has no switch statements, no lambdas. It has significant white space (I've tried and tried but I can't get over it).

There is no simple way to drop down to the command line which means I can't easily use it to replace the scripting I have to do on a day in and day out purpose.

On a side note I greatly prefer go's approach to white space. It's not significant but there is a piece of software that rewrites code to the "standard".


> Python makes simple things hard.

Some examples might help here.

> It has no switch statements

Python uses if/else, hashtables, OO constructs instead http://www.python.org/dev/peps/pep-3103/

> no lambdas.

Python has lambdas, but their usage is discouraged in preference of explicit code blocks and named functions. You can use them if you must.

>It has significant white space

The indentation level of your statements is significant, but not whitespace in general http://www.secnetix.de/olli/Python/block_indentation.hawk

> There is no simple way to drop down to the command line which means I can't easily use it to replace the scripting I have to do on a day in and day out purpose.

Some people find Python usable for system administration. There is a book "Python for Unix and Linux System Administration" (2008).


> Some examples might help here.

I mostly script things so my programs are generally the type that are a bit too complicated for bash. Python makes this type of programming difficult.

For example. I want to run a command and get its output back. I'm then going to go and parse the output and preform transformations on it.

In order to accomplish this I have to use popen to open multiple pipes to the program and then read all of its output. I feel like I'm writing C.

> Python uses if/else, hashtables, OO constructs instead

Both if/else and hashtables are dirty hacks. Neither allows clean code. OO constructs can work but require large amount of setup to preform a simple task like parsing getopts.

> Python has lambdas, but their usage is discouraged in preference of explicit code blocks and named functions. You can use them if you must.

You are correct. I replied to another person's comment but haven't/won't edit my previous post.

> The indentation level of your statements is significant, but not whitespace in general

My apologies for using common terminology for significant indentation, significant indentation is what I meant. Either way I (subjective) dislike it. I personally find it harder to read than braces or ruby's end.

> Some people find Python usable for system administration.

I will strongly disagree here. I've tried to use Python on several occasions for system administration.

> There is a book "Python for Unix and Linux System Administration" (2008)

I'll check it out maybe it will show me somethings that change my views.

A lot of this is entirely subjective. At least for my type of work I find Python to be an annoyance more than a helper.

Though to be fair I find all languages to be pretty ugly/nasty when you take then out of their designed use.


Python is my language of choice for most things. That being said, it's not really a good choice for text processing (that is, using regular expressions) or glue scripts - I find Ruby to be an excellent successor to Perl for those.

For anything that I expect to be maintained, especially by someone else, I tend towards Python, though, because the language seems geared towards that. Significant indentation is nice because your code does what it looks like it does. Docstrings are a godsend. The approach to modules and namespaces is quite helpful. Named arguments to functions prevent silly ordering mistakes.

I just finished writing up my thoughts on this in a bit of a longer form. You can read them at http://changedmy.name/2011/02/16/why-pythons-modules-are-bad... , if you like. I'm well aware that I'm not the best writer, nor am I the most educated or experienced person in this field, so any criticism is welcome.


> It has no switch statements,

Opinionated langauge. You either use a if-elif ladder or use a dictionary to switch. I use dictionaries most of the times; not trying to defend lack of switch here but table driven code tends to be less fragile.

> It has significant white space

Significant indent. The only problems I have ever found with this is when I copy paste code in vim and try to auto-indent. Sometimes when the copy is not properly indented, it goes awry.

The limited lambdas are related to this. Other than copy pasting code and limited lambda as a related consequence, I can't think of any other issues it might cause.

> use it to replace the scripting I have to do on a day in and day out purpose.

Why would you necessarily want to do it? I assume you mean shell pipelines when you say command line scripts. Shell scripts, if you are on *nix, suit a particular class of problems very well.

Sure Ruby and Perl play nicely with command line scripts and I have worked on Perl & am familiar with Ruby, but I seldom resort to them - if it's a shell pipeline, sed,awk,grep and co are summoned. If it grows beyond that, then I open vim and write perl/python re-using the pipeline and adding some logic.


Python certainly has lambdas[1], and they're very 'typical' lambdas at that.

[1]: http://www.secnetix.de/olli/Python/lambda_functions.hawk


You are correct and I mistyped. Python has limited lambdas not a lack of lambdas.


Python makes simple things hard.

It also makes some slightly complicated things really easy, mostly by way of an incredibly extensive standard library.

One line for a static webserver (python -m SimpleHTTPServer). Not that much more to extend it.

On a side note I greatly prefer go's approach to white space. It's not significant but there is a piece of software that rewrites code to the "standard".

Go's bracing, though... http://news.ycombinator.com/item?id=1912986 . Talk about not making wrong code look wrong.


I took a look at the complaint with Go's bracing and it seemed like a bug. Put in a bug report and they responded positively and have since corrected the issue.

Newest versions of Go do not exhibit this issue.


The article is about the author that has been a fan of PHP for a long time and now he loves Python. This is the base of his claim of Python popularity.


Its not surprising. We make extensive use of Python. Its great.

I get so busy doing so many things that I often don't develop for months at a time. This used to be a problem when I used C. With Python its a non-issue.


> [...] Python, Ruby, Haskell, Ada are gaining popularity

Ada???


Defense Contractors




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: