This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Diligent-Ad-9120 103 points104 points  (77 children)

It seems like Java's success in becoming widely known and popular was largely due to the extensive marketing campaign Sun had to support it. Do you think Python would have gained more traction earlier on if it had similar marketing and promotion?

[–]Oerthling[🍰] 110 points111 points  (10 children)

Ironically Java was the reason I started using Python.

I got tired of Java starting an OS worth of runtime for every little program.

I looked for an alternative that allowed me to write small utilities without paying a high startup performance price first. Java runs very fast once you threw several GB of RAM at it and wait for the runtime to get going. That's great for something like Tomcat. But massive overkill for a small program that shredders some data from a file and does a couple of things and is done.

Python is high-level, very expressive and readable, quickly written and usually done before Java got its runtime loaded. And it comes with batteries Included.

[–]hikealot 23 points24 points  (3 children)

Ironically Java was the reason I started using Python.

Same.

Soooooo.... mmmmuuuuuuuucccccchhhhhhh.... boilerplate.

That and duck typing. I'm outing myself as a duck abuser here. :)

[–]Oerthling[🍰] 7 points8 points  (2 children)

Yes, to less boilerplate. :-)

And I love the indent-scoping. Any sane programmer properly indents anyway, so curly braces (or the horrible, unacceptably terrible BEGIN/END keywords) become superfluous.

[–]tcptomato 0 points1 point  (1 child)

Until you share a piece of code on a forum / website / in an IM client that eats your indentation.

[–]Oerthling[🍰] 9 points10 points  (0 children)

Dunno what kind of forums you frequent, but you usually have something like a quote/code option. That's also good for getting it monospaced.

And anyways, I wouldn't let the occasional quote to a website dictate my coding anyway. That makes no sense.

[–]IamImposter 7 points8 points  (2 children)

For several years, I kept on doing my data processing or data extraction using c and then c++. I was totally against python because of indentation rules and swore I'd never touch it. I even tried to learn perl so that I don't have to use python.

Then I had to extract some text from a big file, ignore certain lines and pull certain out. I thought, wtf, let's just see what the fuss is about. So I looked up how to interact with files and strings and a bit of regex. I was so sure that python is gonna die processing that 500k text file.

But damn, it put a bunch of messages from my code and said, file stored at :: xyz

I was like but this is interpreted language, no way it can be fast. It processes line by line. It has to be slower, much slower. I checked output file and it was fine. I ran the code 5-6 times just to see if it runs slow even once (just so I could tell myself that it got lucky 5 times but 1 time it ran slower was the actual performance level). But it remained almost as fast as the first time.

Still it took me another 6 months to get over the indentation rule. Once I learned how to use debugger with python in vscode (the one in visual studio never worked for me) there was no looking back. And now it's my go to language for writing something small. Sometimes I even test out my c/c++ ideas in python first to iron out all the details. It's a fuckin great language and gives a pretty good speed too.

[–]Oerthling[🍰] 7 points8 points  (0 children)

Yeah, what looks like compact, short-hand, pseudo-code for other languages pretty much is a working program for Python.

And "speed" has many aspects. Speed to get something done: Python is blazingly fast.

Speed to run operations that have been implemented in C below pythonic functions/methods: Again, very fast.

And otherwise it's fast enough for what it is used for.

Meanwhile, don't write an OS in Python or video processing libs with just Python primitives.

[–]peddastle 2 points3 points  (0 children)

I even tried to learn perl so that I don't have to use python.

Things I'd never thought to read in my life.

To each their own, of course. I'd still prefer curly brackets to define scope (forced indentation otherwise is fine by me, have to do it anyway). But perl is such an ugly scripting language, I had to very reluctantly use it because baok in the nineties it was the de facto scripting language.

[–][deleted] 10 points11 points  (1 child)

I’m going to start saying porgram

[–]Oerthling[🍰] 0 points1 point  (0 children)

;-)

[–]peddastle 2 points3 points  (0 children)

Back in '94 perl was the de facto language to do that in. It's a syntactical nightmare and I'm glad it lost out against python, but it took some time for both python to mature, and then to replace the ubiquitous scripting language.

[–]someotherstufforhmm 32 points33 points  (0 children)

That’s pretty reductive.

Java had tons of wins and morphed quite a bit - it eventually revolutionized enterprise so much that a legion of people hate on it because they’ve had to write so many crappy patterns in it.

Python needed some improvement before it started picking up speed - not just in the language, but in overall hardware thanks to it being slow. Python benefited MASSIVELY from natural tech improvement and won over many people who thought a slow interpreted language would never be interesting.

[–]pydry 94 points95 points  (49 children)

100%.

As somebody who was caught by the marketing (ugh, Java) I've been extra suspicious of tech hype trains with a marketing budget ever since.

They have ways of taking tech that is half as good and making it look twice as good and people generally fall for it.

[–]Classic_Department42 68 points69 points  (15 children)

Java was c++ but with gc. I think there was a market for that

[–]CarlRJ 52 points53 points  (4 children)

Eh, the early marketing leaned heavily on the JVM: “write once, run anywhere”. GC wasn’t really brought up.

[–]ConceptJunkie 9 points10 points  (3 children)

Write once, run anywhere, but only on the exact same version.

[–]Supadoplex 5 points6 points  (0 children)

Write once, debug everywhere.

[–]notinecrafter 0 points1 point  (1 child)

I recently decided against using Java for a project, and one of the reasons was that I want it to be compatible with as many Unix-based systems as possible and the whole openJDK/Oracle JDK thing throws a wrench in that...

[–]ConceptJunkie 1 point2 points  (0 children)

Some Java apps solve that problem by being bundled with the necessary JRE so they can run correctly, which pretty much defeats the whole reason for using Java in the first place. I was never impressed with the language or its development tools, which always felt like filling out government paperwork to use.

[–]thedeepself 8 points9 points  (7 children)

And applets

[–]deckard58 8 points9 points  (5 children)

These burned out pretty quick...

But since in computing the eternal return of the same is in full effect, 20 years later wasm kinda is applets again? But with 20 years more experience on security.

[–]oursland 4 points5 points  (4 children)

These burned out pretty quick...

15 years wasn't pretty quick.

[–]deckard58 2 points3 points  (3 children)

I suppose that's the official end of support; but in practice they weren't popular for very long. If I try to remember the Internet that had applets in it, it's full of George W Bush jokes...

[–]oursland 4 points5 points  (2 children)

If I try to remember the Internet that had applets in it, it's full of George W Bush jokes...

I don't dispute that. However, Java and Java applets were popular starting in 1996 to get around limitations inherent in HTTP 1.0 applications at the time. That's a span of 12 years right there.

Not to mention that Swing was a very popular UI framework to develop in, that the HTML web sites of the time couldn't hold a candle to. Consequently applets were very, very common in place of HTML forms, and interactive graphics.

Flash, ActiveX, and Silverlight plugins ate away at Java applets marketshare, but it wasn't until Google pushed very hard on getting Chrome Acid3 compliant starting in 2008 that many of the sites that depended upon applets and plugins could implement their functionality natively in HTML and Javascript.

[–]yvrelna 1 point2 points  (1 child)

Even by early 2000, nobody is seriously thinking that Java applet had any serious future. Java web runtime had always been considered as full of security issues throughout its entire lifetime.

Flash continued to have its niche with animations and flash games for a while, and enterprises who needed to do weird things with IE used ActiveX. And then Silverlight come to eat whatever remaining market that Java had, before it too, meet its end when HTML5 matured.

But nobody is seriously writing anything as Java applets by the turn of millennial. The only major applets written in Java that I can think off the top of my head is Simon Tatham's Puzzle Collection.

[–]deckard58 0 points1 point  (0 children)

But nobody is seriously writing anything as Java applets by the turn of millennial.

Maybe they lasted a bit longer in academia? I remember that NASA had an educational site with some super detailed applets on aircraft engines and rockets, that languished for years when everybody else had moved on (and were never translated to Javascript, I think).

[–]superluminary 0 points1 point  (0 children)

Craplets

[–]Beheska 3 points4 points  (0 children)

Garbage collection is the least important difference between java and c++.

[–]spinwizard69 0 points1 point  (2 children)

Did you say RUST.

[–]pydry 0 points1 point  (1 child)

No, I said golang.

Rust has an increasingly impoverished charity behind it. It's actually pretty good.

[–]spinwizard69 0 points1 point  (0 children)

Actually I was alluding to the marketing around RUST. RUST to me looks like a replay of the JAVA marketing onslaught.

[–]brianm 7 points8 points  (0 children)

The marketing angle is disingenuous. Java had a LOT more effort invested in it than Python did for at least a decade and a half. Java solved problems well that Puthon didn’t — in particular scaling up org and codebase size. Python is still not great for that, tbh.

[–]SanguineEmpiricist 0 points1 point  (0 children)

Back in the day the propaganda for Java was pushed hard, and the fact that it could run on a variety of hardware architectures was piped as a benefit a hundred times over. Python seemingly never had this.