Stop comparing programming languages
- Python is versatile
- JavaScript is powerful
- Ruby is elegant
- C is essential
- C++
- Java is robust
C++ is a surprise CVE generator.
I was caught by surprise and for some reason this joke clicked so much that I laughed for a while. Kudos
There was an adjective for C++. It’s just the pointer was dropped.
C++ EXISTS
C++ is all of those, provided you pick any 10% of it.
You’re not supposed to cast every spell in the evil grimoire.
Well, except “robust”, unless you have very strict code standards, review processes, and static analysis.
(And arguably it’s never elegant, though that’s almost purely a matter of taste.)
When the standard for “robust” is Java–
I see where you’re coming from, but no matter how many null pointer exceptions there are in Java code, you’re almost always protected from actually wrecking your system in an unrecoverable way; usually the program will just crash, and even provide a relatively helpful error message. The JVM is effectively a safety net, albeit an imperfect one. Whereas in C++, the closest thing you have to a safety net, i.e. something to guarantee that invalid memory usage crashes your program rather than corrupting its own or another process’s memory, is segfaults, which are merely a nicety provided by common hardware, not required by the language or provided by the compiler. Even then, with modern compiler implementations, undefined behavior can cause an effectively unlimited amount of “bad stuff” even on hardware that supports segfaults.
Additionally, most languages with managed runtimes that existed when Java was introduced didn’t actually have a static type system. In particular, Perl was very popular, and its type system is…uh…well, let’s just say it gives JavaScript some serious competition.
That said, despite this grain of truth in the statement, I think the perception that Java is comparatively robust is primarily due to Java’s intense marketing (particularly in its early years), which strongly pushed the idea that Java is an “enterprise” language, whatever that means.
- Rust has safety and efficiency close to C
- Perl is processing most of your healthcare records
- Ada is doing space stuff
- Go is going places
What happens if I run paint splatters through OCR? Hmmmmm that random output looks like Perl. Holy shit it is Perl!
This actually happening is one reason I love the internet.
Perl? Nah, in this country its vb6, C#, java, gupta/centura and javascript :')
Source: been working for multiple healthcare market leaders in this country for 5 years now
Java is robust haha
JavaScript is powerful
Old joke (yes, you can tell):
“JavaScript: You shoot yourself in the foot. If using Netscape, your arm falls off. If using Internet Explorer, your head explodes.”
Tea? i saw it once in a wikipedia article.
C# is also here
Shhh don’t tell people they’ll ruin it.
I’m a [primarily] C# turned JavaScript dev. I miss C#.
The ecosystem is really it, C# as a language isn’t the best, objectively Typescript is a much more developer friendly and globally type safe (at design time) language. It’s far more versatile than C# in that regard, to the point where there is almost no comparison.
But holy hell the .Net ecosystem is light-years ahead, it’s so incredibly consistent across major versions, is extremely high quality, has consistent and well considered design advancements, and is absolutely bloody fast. Tie that in with first party frameworks that cover most of all major needs, and it all works together so smoothly, at least for web dev.
ITT: Rust programmers rewriting the joke in Rust.
C is powerful. Javascript is a husky midwestern gal at a Chinese buffet.
C is the one you want to marry, but JavaScript answers all of your drunk texts.
Are those adjectives randomly chosen?
Pretty much so.
Yeah, JavaScript powerful? How?
By running everthing in a single thread obviously. Won’t get more powerful than that
good luck doing frontend development without it, but it can also do backend development
it can do everything
I exercised JavaScript out of some of my apps, and I’m happier for it.
Did they get a good workout?
The thing it can do best is bewilder developers with it’s strange choices
i wouldn’t want to program in pure assembly either but asm is definitely powerful
I would argue that ASM isn’t “powerful”. It’s direct. You can access advanced features of a CPUs architecture with the trade off limited portability. Sometimes it’s necessary but power comes from being able to express complex control and data structures in a concise and readable amount of text.
The subjective topic of what “concise and readable” means is where the language wars come in.
That makes it versatile, not powerful.
When I hear powerful language, I think of languages that are good at intensive tasks like assembly, c, rust, Python (because of numpy, pandas, pyspark, cuda, etc.).
Python is powerful because it easily wraps C libraries that do real work! Just kidding mostly.
But yeah, js isn’t a language I would describe as powerful. Ubiquitous? More capable than you would expect given it’s history? Bloated?
Python is powerful because it easily wraps C libraries that do real work! Just kidding mostly.
Not kidding. There’s no rule against that though. It’s good at it’s niche.
Does that not put JS (node) back on the table?
I’d say it’s the low level language doing the heavy lifting, python or JS in this scenario are just front-ends.
Hell, I think FORTH has C bindings, that’s not power, that’s mental illness
Sure, but there are good and bad frontends. JavaScript has a tendency to silently fly off the handle in mysterious ways due to the crazy type system. Python will typically fail more predictably, and is famously easy to write. I know nothing about FORTH, honestly.
but it can also do backend development
The same way a rusty spoon can dig a hole, sure.
if its acceptable to force javascript onto the backend and everywhere else, then why not write the frontend in rust, or anything else than can compile to wasm ?
WASM has no native ability to access most web APIs, including the DOM. JavaScript is literally unavoidable on the front end.
javascript cannot be compiled natively for the backend or desktop either…
also libraries like wasm bindgen allow a developer to write almost no javascript. and i wouldnt could a few lines of bootstrapping.
im dont advocate for wasm when its not necessary. nor do i advocate for backend js when its not necessary.
Sorry, I’m not sure what your point is. I realize that you can almost completely avoid JavaScript, but the point I’m making is merely that there is a real technical limitation that limits the choices developers can make for front-end code, and although WASM is making great strides in breaking down that barrier (something I’ve been thrilled to see happen, but which is going much more slowly than I had hoped), the limitation is still there. Conversely, such a barrier has never existed on the backend, except in the sense that C limits what all other languages can do.
my point is that languages have their places.
javascript is great for the frontend. not just because it’s the only choice, but it’s also a lot easier to write code for ui than say, C or rust.
however i do not see a reason why it needs to run on servers or desktop apps, bar a few cases. i know node is popular, but i think fullstack devs just like to have everything in the same language, even if it makes it harder to use and slower to run.
likewise C, rust, go, whatever, are great for backends, embedded etc, but they shouldnt be ran on in the browser, unless there is a specific reason like heavy computation with little dom interaction.
just because a barrier does not exist doesnt mean that we should write programs in a language not designed for the domain.
IIRC JavaScript + TypeScript is the biggest demographic of engineers in the industry if you go by GitHub stats
I suppose you could call that power in a way
JavaScript is AN UNAVOIDABLE HARDSHIP
- PHP is old
- HTML is NOT A PROGRAMMING LANGUAGE!!!
- CSS is
︎ ︎ ︎ not alig-
︎ ︎ ︎ ned
Modern php is not bad actually. Still kinda slow and dangerous, but A LOT better than it used to be :')
That said, i wouldnt build a web service with php still lolPHP is old
Same age as Ruby, Java and JavaScript, but younger than Python, C, and C++. 😛
I’m guessing they meant “old” as in “no one uses it anymore, it’s dead”
Don’t tell my bosses that. Or the PHP community as a whole for that matter. Then I might have to get a real job.
I’m sorry. If you exclude the millions of sites using it, it is virtually unused.
Meanwhile PHP quietly runs 80% of the internet by being used for WordPress.
The year they both came out (1995) I was coding in Visual Basic 3. Ack.
Actual definitions (my opinion):
- HTML is website
- CSS is style
- JS is everywhere
- SQL is data
- Python is simple
- PHP is backend
- Markdown is README
- YAML is config
C++ is… I got nothing.
C++ is inferior to Rust and should be used in no new projects unless it is absolutely necessary
I believe the trade-offs make Rust the best option to replace C++. Now, i’m not sure about Zig replacing C yet…