Over the past few days (sorry, too many other things have been cropping up), i've been spending time learning about Python. i think i finally see what's gotten folks so darn hyped up about it.
For me, Python is what happens when you take COBOL, SmallTalk, Javascript and Perl, toss them in a box, shake really hard and pull out what stuck together. i could argue and point out what came from where, but that really doesn't matter. If someone wasn't exposed to those languages and only saw Python, they'd be right enamored too.
Python definitely seems to be targeted at text protocols like XML, HTTP and the like. Perl's a bit easier dealing with stuff that's Regex heavy like straight text processing, but Python obviously takes advantage of later developments in document models. Bits seem a bit overblown (seriously, Lambda functions are simply anonymous functions. Javascript, Perl, and a host of other languages have 'em. Likewise, SmallTalk has had the "everything is an object" thing for just about ever. Including operators. Meaning that yes, you could do things like //Convert '15' to a number and add 10 limiting to one byte if you really felt like giving the folks that may inherit your code reasons to hate you forever.) i'm still not horribly convinced that building structure around whitespace dependencies is a horribly good idea (sorry, dealt with too many bits of code poorly transported to not appreciate the concept of delineated code blocks), but i'll get over that.
value = '15'.asNumber +.inOneByte 10
Still, it's interesting to see what one can do with this. Definitely going to have to play with it a lot more.
FWIW javascript has the "everything is an object" (except operators I think) too…
Does this xkcd python comic seem right? :)
Save This Page

Python is pretty rad. However, after writing a good amount of Ruby code I've noticed I am having a problem w/ stuff like
str(a)in Python. Comparing it to Ruby'sa.to_sit feels weird to me now.Then again, Python still beats Perl hands down (in my book), and compared to Ruby it has the added advantage of real threading…