|
|
rsw@jfet.org
blogroll
|
|
|
whitespace Nazis must die
How am I the only person who sees how retarded Python is? It is, no lie, the worst programming language ever created.
Seriously. This is a language for which scripts can go from working to completely broken because your text editor converted tabs to spaces or vice-versa. I can email a working script to you and have it arrive broken. Newsflash: no one bothers to preserve whitespace because you can't fucking see it. Differentiating between a tab and seven spaces makes you retarded.
If you program in Python and like it, you are dead to me. If I see you programming in Python, I will kill you. Seriously, if you see me walking down the street while you're programming in Python you best jump right in the nearest coffin, I don't care if it's your birthday and you mama needs the coffin 'cause she's dead.
[ permalink | 8 comments ]
writebacks
Ariel wrote
Dude, Python is about as fascist as Barack Obama. Your rant sounds almost like a Fox News expose. Not that I'm in love with Python, but white space is only necessary for delineating nested blocks. Moreover, the amount of indentation (7 space, 5 spaces, tab character, etc.) is pretty arbitrary. See here:
http://www.secnetix.de/~olli/Python/block_indentation.hawk
Ariel wrote
Replace "nested blocks" with "statements". Sorry, I'm still kind of jet lagged.
rsw wrote
Wait, so you're saying that Python is socialist?
But seriously, the link you posted above does nothing to assuage my consternation. The dude readily admits that tabs versus spaces will break a Python script, then tries to construe this as somehow on par with tab versus space making C code hard to read.
I can write a piece of code in Python that works perfectly if spaced and breaks completely but silently if tabbed. I can email you this code and, upon running it, you will get the wrong result. If I had used Perl or C instead, you could do whatever you wanted with the whitespace and it would still work.
By the way, for assholes who can't understand a program unless it's tabbed the way they like, there are razor blades. Down the sidewalk, not across the street. Or, you know, code pretty printers that accommodate their delicate sensibilities.
Ariel wrote
Man, you're really pushing hard on this. I'm honestly a little surprised by your fervor.
I agree with you that spaces vs. tabs confusion can cause a Python program to break and that sucks. Does that make it worth less as a programming language than, say, Fortran which also has some (admittedly not as broken) whitespace rules? I'd say no, not based purely on how it handles whitespace.
Interestingly, I think the Python people have created a sort of holy war (similar to emacs vs. vi) on what the standard for a "tab" is. Most Python people are vehemently against using the ASCII tab character and want everyone to standardize on a "tab" being 8 spaces or something like that.
Personally, I could care less about all of this. If you have a modern text editor this is usually taken care of. I think that because of the silly whitespace requirements, Python will probably never be as "mature" as Perl or C. Then again, everything I've ever used it for hasn't needed any kind of serious scrutiny so maybe it's found some sort of retarded niche or something.
Ariel wrote
Okay, I should really stop posting so damn early in the morning. The correct phrase is "couldn't care less", "could care less" is sort of a silly thing to say in these situations.
Also, my train of logic probably got derailed somewhere in there. What I'm trying to say is:
- Python is not totally worthless, despite the stupid whitespace rules. It's very fast to pick up and has quite a bit of functionality.
- Despite the Python fanatics' deepest desires, it'll probably never be considered as being on the same level as a C or a Perl.
P.S. BBQ. As in, I had Yakiniku last night and it was delicious.
Scott wrote
Good thing I write all my software in Postscript.
BT wrote
I was born and bred on Perl, so I suspect it will always wind up being the tool of choice when I reach for something to script with.
However, Python is kind of superior in a lot of ways: * A live interpreter means never having to write test scripts to see if your regexp works. And maybe also never having to say that you're sorry. Not clear on the details. * Data structures were supported from the get go, not added in Python5 as a replacement for encoding your data structures as increasingly complex strings. * Self documenting. And the interpreter means you actually occasionally read the documentation unlike Perl docs. * Minimizes for loops -- because they're totally a thing of the past. (I still haven't come to grips with the fact that, sometime in the near future, for loops might only be the domain of overweight, bearded compiler/kernel designers because software engineers have moved to greener pastures.)
rsw wrote
Re: BT Wow, thread necro here. Missed your comments, BT:
* The only reason you need a live interpreter in Python is because, on account of the whitespace requirements, the python equivalent of "perl -e '{stuff}'" is crap. I constantly use "perl -e" to test out constructs I'm not clear on.
Now, you might say that this is clumsy compared to a real REPL, and I agree that it is, for the most part. Having just done a bunch of coding in Standard ML, I agree that having a REPL is very nicebut mostly, in SML's case, because of how fucking picky the compiler is (thanks strict type inferencebut really this is a very good thing because it means that once your code compiles it's basically bug-free). For the kind of coding I do with Perl (which is kind of anything and everything, now that I think about it), I just don't see that I would use a REPL that often in a way that makes it substantially more convenient than "perl -e".
* There is absolutely nothing wrong with data structures built out of lists of hashes of lists of references to lists containing hashes of function pointers. Truly this is approximately the way to enlightenment:
&{${${${${$foo[0]}{'bar'}}[1]}[2]}{'baz'}}('quux');
* Those of us who have been up all night have no need of self documenting code. We require strong drink.
* Perl fully supports closures, which means that you absolutely don't have to use for loops if you don't want to. Perl just gives you the option of doing it if you want to. Also, Perl5 now has a full blown continuation library, which Python does not, and Perl6 will natively support continuations and some other very very nifty shit (e.g., junctive and disjunctive variables, which are extremely awesome).
In the end, Perl vs. Python is a pointless argument, because they're both fighting over crumbs. Scheme is the greatest language ever conceived.
post a comment:
|
|