Posted: Sun Aug 26, 2007 3:58 pm Post subject: Python
I keep reading about hackers who swear by Python. Anyone here use it much? I have written a few lines of it and found it ok, but I was wondering if it has a definite appeal over, say, Ruby, or if it is just a matter of preference? In other words, is it worth learning if I already know Ruby?
Sponsor Sponsor
rizzix
Posted: Sun Aug 26, 2007 4:21 pm Post subject: RE:Python
Python's moto's a bit different from Ruby's: "There are no surprises!" (or something like that). Generally this is ideal from any perspective and you'll notice the benefits when you begin large complicated projects.
As a scripting language for small hacks/scipts etc, Ruby would be better suited than Python, anyday! Simply because Ruby strives to be more expressive and encourages TIMTOWTDI (very perl-like).
Otherwise, they're quite similar.
Edit: Oh and I forgot to mention, Python's documentation is much better than Ruby's. Ruby's documentation seriously is pathetic!
Tony
Posted: Sun Aug 26, 2007 9:53 pm Post subject: Re: Python
I haven't actually tried Python (yet), but an interesting fact to consider is that Google engineers use Python, and not Ruby. Though arguably only because they purposely limit the number of languages they use in total (that would be 4: Python, JavaScript, C++, and Java)
Posted: Sun Aug 26, 2007 10:43 pm Post subject: RE:Python
Don't choose. Learn both Ruby and Python.
We can't tell you which you will like better.
If one were quantitatively better than the other in every conceivable way, we'd only have one.
PaulButler
Posted: Mon Aug 27, 2007 8:30 am Post subject: Re: RE:Python
wtd @ Sun Aug 26, 2007 10:43 pm wrote:
Don't choose. Learn both Ruby and Python.
We can't tell you which you will like better.
If one were quantitatively better than the other in every conceivable way, we'd only have one.
I had a feeling that "learn both" would be your response. And eventually I'm sure I will learn it, or at least learn enough that I can be sure I prefer Ruby. I guess what I am asking is: from everything I heard they seem to be very similar languages (in terms of expressiveness, power, standard library, user community, etc.) but with different syntax. Is this the case?
wtd
Posted: Mon Aug 27, 2007 12:52 pm Post subject: RE:Python
They have distinctly different characters. They are by no means the same language with different syntax.
Both do rely heavily on non-statically verified structural subtyping (duck-typing, if you will), though.