45
14
u/its_never_lupus Apr 08 '15
A small correction; while C++ is certainly older, Java is actually younger than Python (Python created in 1991, Java in 1995). Python feels newer than it is because it was a very niche language for a long time.
14
u/fuzz3289 Apr 08 '15
But Python aged like Jennifer Aniston and Java aged like fruit left outside in the sun.
3
u/space_coder Apr 08 '15
(Python created in 1991, Java in 1995).
Actually Python and Java are practically the same age. Python was started in December of 1989 while Java was started in June of 1991. Python 1.0 was released in January 1994 while Java was released sometime in 1995. Java had very ambitious goals and had relatively more features in its initial release than Python's.
Not that this actually means anything about the quality of either language. I like both and each has its strengths.
EDIT: I consider any language with 20 years or more development pretty mature regardless of the exact date of or the features found within its initial release.
20
u/ChikkaChiChi Apr 08 '15
Does getting a handy from PHP during the day count as cheating?
3
1
58
21
u/threeys Apr 08 '15
You nerds are trying so hard to be normal that you won't even laugh at a joke. Lighten up
4
4
4
u/chub79 Apr 08 '15
It's actually really sad to compare a programming language to a woman. What's even worse is that people in this sub upvoted this. Poor attitude.
12
u/thisusernameismeta Apr 08 '15
I don't see why it's getting all the hate in the comments. It's cute. Then again, I also will compare natural languages to people with distinct personalities in my head, so maybe I'm just the oddball here. Nevertheless, I don't think it's sad or a reflection of a poor attitude.
For the record, I'm a woman.
6
u/chub79 Apr 08 '15
You being a woman doesn't change the fact it's rather sad to me. He would have compared Python to a man with strong muscles and I would have disliked it just as well.
I mean
She hears what those other, older languages like Java and C++ say, and she thinks she's not stable or mature enough. She hears what those shallow, beauty-obsessed languages like Ruby say, and she thinks she's not pretty enough. But she's trying really hard, you know? She hits the gym every day, trying to come up with new and better ways of JIT'ing and optimizing. She's experimenting with new platforms and compilation techniques all the time. She wants you to love her more, because she cares.
You don't find that wrong at all?
10
u/tilkau Apr 08 '15
Personally, I don't find it obviously wrong. Just weird, like naming your car and then talking about it like it's a person. (or heck, even talking about your pet like it's a person.). A few sentences of that is funny. Multiple paragraphs of that inspires concern about a person's mental state.
2
u/thisusernameismeta Apr 08 '15
I don't, actually. In that case, agree to disagree? I also would find a comparison to a guy amusing.
Like sure, that doesn't sound like an ideal woman, but it sounds like an accurate representation of how Python would act were it a woman.
To each their own. :)
2
u/chub79 Apr 09 '15
I don't think we discuss about the same thing. I don't even consider the humour in this text simply because I find it wrong one could compare a language to a human being.
1
u/thisusernameismeta Apr 09 '15
Not that your opinion is wrong, but out of curiosity, how do you feel about metaphors?
2
u/chub79 Apr 09 '15
Hah! I don't have anything against metaphors and I do have a sense of humour, trust me. I just feel strongly against those kinds of metaphors because they simply carry something wrong in my book. At least, that one went against some of my values.
It's just a projection of truly wrong clichés that can't be considered as "harmless humour" to me.
-1
Apr 08 '15
You must be fun at parties.
-2
2
u/FredTargaryen Apr 08 '15
Yeah... when you start writing things like this it's time to go outside for a bit
2
u/KurtLovesCode Apr 07 '15
I find Ruby prettier :)
2
1
u/art-solopov Apr 08 '15
I love them both. =) Ruby's a tad more poetic and dreamy and Python is more pragmatic, sometimes more straightforward and it really helps that she's literally everywhere.
-3
u/KurtLovesCode Apr 08 '15
I dunno... I think maybe there's an easier way to do this in Python. Please let me know if there is.
Python:
list(map(lambda x : x*2, [1, 2, 3])) # => [2, 4, 6]Ruby:
[1, 2, 3].map { |x| x * 2 } # => [2, 4, 6]I believe, in this case, ruby is way more readable and, consequentially, beautiful.
11
6
u/tilkau Apr 08 '15 edited Apr 08 '15
[x * 2 for x in [1,2,3]]Learning comprehensions (list, set, dict) and generator expressions is well worth the time.
I know
map()is useful for something, but I've never used it. Comprehensions are just so clear for most cases.-1
u/KurtLovesCode Apr 08 '15 edited Apr 08 '15
So ruby is readying from left to right while in python you read from the inside out?
I guess it's a matter of preference, but I find reading left to right much easier then Python's nested expressions.
Also, what if you're attempting to chain together commands?
In python, this is my attempt to join together the resulting list and create a string:
>>> (' ').join([x * 2 for x in [1,2,3]]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: sequence item 0: expected str instance, int foundHere it is in ruby:
[1, 2, 3 ].map { |x| x*2 }.join(' ')4
u/art-solopov Apr 08 '15
Python is much less lax when it comes to types, so you need to write
(' ').join(str(i**2) for i in [1, 2, 3])4
u/tilkau Apr 08 '15 edited Apr 09 '15
Python is also reading from left to right. The full syntax of a comprehension is
EXPR for FOREXPR.... if EXPR
For example
[x*2 for x in [1,2,3,4,5,6] if (x % 2) == 0]
[4, 8, 12]It performs the equivalent of map() and filter() in one step.
Another example:
[ x * y for x in [1,2,3] for y in [4,5,6] if ((x+y) % 2) == 0]
[5, 8, 12, 15]I do understand the 'inside out' argument, since you're putting the loop(s) after the value assignment. But filtering cannot be clearly included otherwise. It's the same ordering as a SQL
SELECTcommand.
1
u/TotesMessenger Apr 09 '15
This thread has been linked to from another place on reddit.
[/r/drama] /r/Python argues over a "cringeworthy" submission comparing the programming language to a beautiful woman.
If you follow any of the above links, respect the rules of reddit and don't vote. (Info / ^Contact)
1
u/Paddy3118 Apr 08 '15
Eeyuck! Anyone else feel weirdly disgusted whilst reading that?
It's just a great programming language.
-11
u/mallyvai Apr 08 '15
Writer of the answer here:
I wrote that answer in about an hour, one day when I was staying home from work in Seattle. Glad to see it's still making people happy!
PS - Check out http://OfferLetter.io - It's a startup I launched after leaving Twitter. We provide career and negotiation advice to help engineers make the best career decisions on the best terms possible.
If you've ever wondered if your salary / equity package is fair in terms of data, there's always Offer Drive - (http://OfferLetter.io/drive.html) - donate your comp info, get back access to a statistical pool that shows where you stand.
Cheers, and happy Python'ing! _^
0
Apr 08 '15
i was expecting to read something about python 2 vs python 3 incompatibility and how does that fit into your woman metaphor, but didn't get anything
i am disappoint
-2
-4
-18
u/sw_dev Apr 07 '15 edited Apr 18 '15
The "whitespace as syntax" thing makes me wonder if she did too much "LDS" in her younger days, though... Like a lovely girl with a horrible stench, it's all about ignoring it long enough to enjoy her company.
(Seriously, I think Guido did it just to be weird. Mission accomplished.)
Downvoters: Get a life. Not everybody likes the same things. Get over it.
5
u/sambowlby Apr 08 '15
too much Latter Day Saints?
1
u/sw_dev Apr 20 '15
Never saw that movie, didja? It's a shame, it was the best of the original Star Trek franchise.
3
-2
161
u/[deleted] Apr 07 '15
i like python but this is cringeworthy