this post was submitted on 14 Jun 2024
667 points (92.9% liked)

Programmer Humor

19623 readers
96 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 

Stop comparing programming languages

  • Python is versatile
  • JavaScript is powerful
  • Ruby is elegant
  • C is essential
  • C++
  • Java is robust
you are viewing a single comment's thread
view the rest of the comments
[–] odium@programming.dev 48 points 5 months ago (3 children)

Yeah, JavaScript powerful? How?

[–] AceSLS@ani.social 51 points 5 months ago

By running everthing in a single thread obviously. Won't get more powerful than that

[–] polonius-rex@kbin.run 13 points 5 months ago (5 children)

good luck doing frontend development without it, but it can also do backend development

it can do everything

[–] RoyaltyInTraining@lemmy.world 31 points 5 months ago (1 children)

The thing it can do best is bewilder developers with it's strange choices

[–] polonius-rex@kbin.run 10 points 5 months ago (1 children)

i wouldn't want to program in pure assembly either but asm is definitely powerful

[–] wreel@lemmy.sdf.org 6 points 5 months ago

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.

[–] CanadaPlus@lemmy.sdf.org 26 points 5 months ago

but it can also do backend development

The same way a rusty spoon can dig a hole, sure.

[–] odium@programming.dev 12 points 5 months ago* (last edited 5 months ago) (1 children)

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.).

[–] echindod@programming.dev 12 points 5 months ago (1 children)

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?

[–] CanadaPlus@lemmy.sdf.org 5 points 5 months ago* (last edited 5 months ago) (1 children)

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.

[–] 9point6@lemmy.world 1 points 5 months ago (1 children)

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

[–] CanadaPlus@lemmy.sdf.org 6 points 5 months ago (1 children)

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.

[–] odium@programming.dev 2 points 5 months ago

Dw, no one does.

[–] frezik@midwest.social 3 points 5 months ago (1 children)

I exercised JavaScript out of some of my apps, and I'm happier for it.

[–] ripcord@lemmy.world 3 points 5 months ago

Did they get a good workout?

[–] lseif@sopuli.xyz 1 points 5 months ago (1 children)

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 ?

[–] BatmanAoD@programming.dev 5 points 5 months ago (1 children)

WASM has no native ability to access most web APIs, including the DOM. JavaScript is literally unavoidable on the front end.

[–] lseif@sopuli.xyz 1 points 5 months ago* (last edited 5 months ago) (1 children)

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.

[–] BatmanAoD@programming.dev 3 points 5 months ago (1 children)

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.

[–] lseif@sopuli.xyz 1 points 5 months ago (1 children)

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.

[–] BatmanAoD@programming.dev 2 points 5 months ago (1 children)

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.

[–] lseif@sopuli.xyz 1 points 5 months ago

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.

[–] 9point6@lemmy.world 10 points 5 months ago (1 children)

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

[–] CanadaPlus@lemmy.sdf.org 20 points 5 months ago

JavaScript is AN UNAVOIDABLE HARDSHIP