Stop comparing programming languages

https://programming.dev/post/15522805

Stop comparing programming languages - programming.dev

Stop comparing programming languages * Python is versatile * JavaScript is powerful * Ruby is elegant * C is essential * C++ * Java is robust

  • PHP is old
  • HTML is NOT A PROGRAMMING LANGUAGE!!!
  • CSS is
    ︎ ︎ ︎ not alig-

︎ ︎ ︎ ned

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

PHP 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.
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 lol

Mfw Rustaceans don’t exist :(

Also, JavaScript…why are you the way you are? Does anyone have advice for learning it so it makes sense? I can’t even get tutorial projects to run properly…

This meme is older than rust.
actually it says 8h meaning it's only 8 hours old
It will be 8 hours old forever.
use typescript and don't look too hard at the infrastructure
I tried, but the infrastructure collapsed on me.
Lol any
Last company I worked at used Typescript, but used any for everything… I have no idea why. I never got an actual answer.
Because they didn’t want to train their JS developers and didn’t want to cause friction for new projects. They get to say they’re using TS, with basically none of the real advantages. (Apart from general rational error checking.)

The mantra that got me through JavaScript was “almost nothing we do here is able to be synchronous”.

Everything about the language makes more sense, with that context.

Start simple.

And that probably requires not going with a tutorial. Because the JS ecosystem scorns at “simple”. Just make some HTML scaffold and use MDN to understand the DOM.

I like Douglas Crockford’s talks about the “good parts” of JavaScript. They’re old and probably a bit outdated, but he explain quite well the history and why JavaScript is the way like it is.

It clicked for me when I saw them the first time. Still hate JavaScript though.

What Crockford did was enable a lot of devs to realize there was a viable development platform built into the most prolific and open network client in the world. For that he should be commended but it should have never been taken as “this is a viable general purpose language”.

He also showed that JavaScript has more resemblance to functional programming languages rather than object oriented ones. If you try to treat it as an object oriented language like Java (like the seem to imply), you will have a bad time.

This has changed with TypeScript though.

Can it even make sense tho? To me JS is an example of a not too good thing that people started too eagerly so now they’re trying to make it make sense.
Are those adjectives randomly chosen?
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

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.

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.
Dw, no one does.
I exercised JavaScript out of some of my apps, and I’m happier for it.
Did they get a good workout?

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…
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.
C Isn't A Programming Language Anymore - Faultlore

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.

I’m honestly not convinced JavaScript is good even for the front-end, because it’s intentionally designed to swallow, ignore, and otherwise minimize errors; which is not helpful at all for development of any software. My point is that the only reason JavaScript is dominant in front-end development is that, prior to WASM, it was literally the only option; if that hadn’t been the case, I doubt it would have become nearly so widely used.
i actually agree, but i think its more the issue that modern websites are designed like desktop apps. having a weakly typed and flexible langauage like js is fine when youre only adding a little interactivity to an otherwise mostly functional website.

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
  • C++ is fine
  • Python is fine
  • C# is fine
  • PHP is fine
  • JavaScript is fine
  • C is fine
  • Java is fine

I could go on

PHP is fine

i will fine you

JavaScript is also not fine.

C++ apparently has a lot of footguns if you use too many parts of it. C and orthodox C++ are fine.

people say this but C is significantly more batshit than javascript

oh you used scanf? one of the basic functions of our language? sorry that's got a buffer overflow vulnerability so now your application is compromised

Yeah, but as far as I understand that’s not a C vulnerability. It wasn’t added. C just exposes how the underlying CPU works.

If you could avoid exposing dangerous memory quirks but still retain the same power… well, you’d have invented Rust. Rust is a better language than C, I agree with that.

Edit: Yep, just double checked. Buffers live in physical memory and have to be finite, so if you advance outside of them you’ll go somewhere else. Scanf’s not special, this is just another inherent pointer issue.