Ian Bicking: the old part of his blog

Re: Why Web Programming Matters Most

Python does not "appeal to programmers".

Every programmer I know did the same thing I did when they dipped their toe into python. "It imposes rules on whitespace??" And then they drag it to the recycle bin. A 30 second experience. Fixing THAT is what "Matters Most" for Python. Until you do, it will continue to be a niche.

Comment on Why Web Programming Matters Most
by Bog

Comments:

I almost did it myself (drag to recycle bin) when I first found Python. The only reason I kept it (and am I glad I did!) was because it was recommended by a coworker (programmer) whos skills I highly respected. Soon I realized there was really nothing to be afraid of, my productivity soared and now it's my first choice for most tasks. It was an important life lesson too - to be wary of my own prejudice when encountering something new. I now realize my traumatic experience with COBOL in school, and the fact that most languages don't use whitespace, had built my prejudice.

Anyway, Python went from 8% to 14% usage in one year (fastest growing language in the enterprise) according to this InfoWorld article - http://www.infoworld.com/article/04/09/24/39FErrdev_1.html?s=feature . I'd also suggest you look at the python.org jobs page and quotes page to see what people are doing with Python. That might make you rethink your 'niche' comment.

Cheers!

# Shalabh

If the shape of your whitespace is your idea of self-expression, you can't really be that much of a "programmer".

# arimasp

My idea of "self-expression"? Huh, what am I, picasso? The shape of my whitespace is my idea of organization, that's what it is. (And so I guess writing organized code doesn't make me "much of a 'programmer'" according to your comment.)

# Bog

source
This thing about indentation/whitespace has dogged python forever. Personally, I think it is
a great feature, but for those who won't touch python without curly braces, there is an easy fix:

Just accept an alternate form of blocks, which is:


  xxx ... {
  code          # Note: code here is deliberately randomly indented.
    code
   code
  }


instead of


  xxx ... :
    code
    code
    code







right in the Python compiler. (I can hear all you python zealots scream so loud :)
since it breaks the 'one way to do it', and pushes a stake right through the heart
of the indentation based readability, but hey why not?

I have often thought of whipping out a perl (sorry) preprocessor script that could take
such braces based syntax and turn that to standard indentation based syntax, but it
is best done right within the python compiler and interpretor: maybe allow a
new command-line option that allows for braces based blocks.

/Nara
# Nara Narasimhan

Real programmers don't drag programs to recycle bins. ;)
# Magnus Lyckå (Who dislikes systems that assumes that ASCII is enough)

If Python were like "every other" programming language, what would be its advantage? The Monty Python tie-in?

Python does appeal to programmers. When you are sick of your current language and you want something better, you finally decide to do more than dip your toe in. Or that super programmer down the row who you respect, because he really is very good at programming keeps telling you Python is worth learning. You finally break down and start playing with it. Or you think LISP is really cool, but not really practical these days and you look to Python.

Whatever, but it takes some effort to learn a new language. If the new language were just like your old language, you wouldn't be making the effort to learn it.

Programmers impose rules on whitespace themselves. Would you like to read a program written in Perl (or whatever) where the programmer used no whitespace to denote structure? Or worse yet had incorrect indentation? It would be horrible. The first thing you'd do was fix it, curly braces or not. You need the whitespace. So who cares about the curly braces? They don't matter. Indentation is what matters.

I ran across a really good quote recently. It kind of fits the whole whitespace argument. The thought being that the way Python does whitespace is a really good idea:

"Don't worry about people stealing your ideas. If the ideas are any good you'll have to ram them down people's throats" - Howard Aiken, computer scientist.

# Dennis

That's odd. I had the opposite experience. Personally, it took a few minutes for me to get over the whitespace, but most of the programmers I've introduced it to haven't cared. Of course, many of them are used to various 4gl-ish vertical-app languages, so maybe it's not too representative...

My experience is that there are two kinds of programmers: Those that want the best tool for the job (and are willing to adapt a little to best leverage the tool) and those who trash anything not "just like" what they're already used to.

I use Python primarily for doing network management housekeeping on a university network (802.1x, mac-based radius auth, etc). Most of the comments I see about making changes to python make me nervous, as they seem to ignore any "non-web" usage in a rush to "beat PHP" or whatever.

# Robert