||[Aug. 20th, 2008|11:17 am]
My this kool-aid is tasty and refreshing!|
The best thing? You only need a couple of sips.
Long live interpreted indentation!
Yeah, makes Perl feel so COBOL-ish
I still like Perl. I suspect I'll end up using Perl for script-y things and Python for object-y things. (And wish that Tcl/Tk was available for UI-ish things.)
It's more like, how does anyone cope with the horrors of lower-level languages like C, where you actually have to do memory management by hand?
The times I've seen UI work done in Tk, it always had a "Roll-your-own" flavor, but it's been a number of years since I looked at the language.
Sadly, Tk isn't pretty on the screen because it's badly in need of about a decade's worth of updating. But the code is gorgeous.
Then that aspect hasn't changed. Yes, that it is.
You must have seen this xkcd comic
I ♥ python. Like any language, it has its warts*, but it's fun to program in and I'm glad I switched my research language from Java to Python (not that it helped me get finished any sooner). For advanced fun, look at list comprehensions, generator comprehensions, and generators. My programming tends to be very mathematical and involve data transforms so I use these all the time. Decorators also seems like a really powerful construct, but I haven't had occasion to use them much.
* Python 3(000), coming this October, removes a lot of these.
Haven't gotten to generators yet, but list comprehensions are quite nice.
I think I like perl's closures better than python's lambda function, but casual introspection from the fact that functions are objects too seems pretty keen.
But Python >> Java, for sure.
I'm getting over the whitespace thing. It helps that Dive Into Python is up-front about it and says, "After some initial protests and several snide analogies to Fortran, you will make peace with this."
I'll heartily second these observations. List comprehensions are a very natural way to program, especially if you did a lot of perl. Maps and lambdas may be made for people happier with LISP but they're still very helpful for me.
Decorators, on the other hand, make me weep. It's not that they're not useful. We have a lot of decorators used for factory patterns in code at work that has no real need of factories and it quintuples the effort to debug the bloody code.
Least favorite python gotcha: Variable behavior for global variables in non-global scope.
Don't your teeth feel white and shiny? And all the colors are brighter in the world? Lovely, innit.