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 thread.
View all comments View context
8 points
*

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.

permalink
report
parent
reply
6 points

exposing the machinations of the underlying CPU with no regard for safety is like, the definition of a footgun

permalink
report
parent
reply
6 points
*

Okay, but how do you code on a CPU without directly interfacing the CPU at some point? Python and JavaScript both rely on things written in mid-level languages. There’s a difference between a bad tool and one that just has limitations inherent to the technology.

Like, to echo the meme a bit, it’s not a totally straight comparison. They have different roles.

permalink
report
parent
reply
5 points

a footgun isn’t inherently bad, it just implies a significant amount of risk

yes, if you need the ability to code on a low level, maybe C is necessary, but the times where that is actually necessary is smol

also rust

permalink
report
parent
reply
1 point

What’s the point of having a function in the standard library if the universal recommendation is to never use it?

permalink
report
parent
reply
1 point
*

Is that the recommendation? This is the first time I’ve actually seen it discussed.

I’m wondering at this point if a new, different stdlib would be better. Or just use Rust.

permalink
report
parent
reply
1 point

To be honest, my comment probably applies more to gets, but the point is the same.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 9.4K

    Monthly active users

  • 861

    Posts

  • 33K

    Comments