Eric S. Raymond: "Why Python?"
Honestly, I wish Python was as fantastic as Eric S. Raymond makes it out to be. Apparently, he found that Python was the right tool for a job he had to do, and now he hails it as something holy.
If you can be completely swayed after writing 32 lines of a new language, I have a bridge to sell you.
I've tried Python. I've used Python. I haven't given up on it, but I don't exactly love it, either. Yes, it's clean (sort of). Yes, it's object-oriented. And I don't mind the whitespace restrictions whatsoever.
So Eric has had his say on why he uses Python. Let me have mine.
Why do I use the Python language?
- I want to have to go around installing a gigantic new interpreter on every system on which I intend to use my scripts.
- I like the convenience of not being able to print without a mandatory line break that can only be removed by crudely calling a backspace-command control character.
- Total lack of strong typing finally forces me to use Hungarian notation in my code like they always told you to do in school because otherwise, I have no idea what my variables contain.
- Perl's utterly consistent OO syntax of "Category::Class->function(parameters)" is far too easy to remember. I want to have to go digging through docs.python.org to find out that the inverse of the time.gmtime() function is in the calendar module, which deems it "unrelated but handy".
- I just love it when a language throws an exception because everything did what it was supposed to and nothing is really wrong. Having to define my own DefaultErrorHandler class is so much more fun than reading a predefined status code and failing gracefully.
- Python creator Guido van Rossum on strong typing: "[Strong typing] makes you focus too much on getting the types right and not enough on getting the rest of the program correct". I like it when a language won't let me define my types at all and then fucking refuses to interpret "123" as being the same as 123 without an explicit cast. Thanks, Guido! I'm really getting my program correct now that I have all of these str()s and int()s everywhere!
- Having a mindboggling number of Perl modules at my fingertips made me too complacent. I like Python's lack of everything. It makes me feel rugged and pioneery.
- Lambas save so much more space than dinky little subroutines like sub minval { ($a, $b) = @_; if ($a < $b) return $a; else return $b;} And you can hide them anywhere! Did someone say "job security"?
No comments:
Post a Comment