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
2 points
*

once you understand C++ the pitfalls of C++ are reasonably consistent

All of C++? That’s unreasonable, it’s even in the name that it’s very expansive. Yes, if you already know a thing, you won’t be surprised by it, that’s a tautology.

C is more than just pointers, obviously, but the vast majority of the difficulty there is pointers.

there are like what, 3 operating systems these days? assume those are all written entirely in c and combine them and compare that to all code ever written

Plus all previous operating systems, all supercomputer climate, physics and other science simulations, all the toaster and car and so on chips using bespoke operating systems because Linux won’t fit, every computer solving practical engineering or logistics problems numerically, renderers…

Basically, if your computational resources don’t vastly exceed the task to be done, C, Rust and friends are a good choice. If they do use whatever is easy to not fuck up, so maybe Python or Haskell.

permalink
report
parent
reply
2 points
*

All of C++? That’s unreasonable, it’s even in the name that it’s very expansive.

similarly, “all of pointers” is unreasonable

“all of pointers” can have a lot of unexpected results

that’s literally why java exists as a language, and is so popular

Plus all previous operating systems, all supercomputer climate, physics and other science simulations, all the toaster and car and so on chips using bespoke operating systems because Linux won’t fit, every computer solving practical engineering or logistics problems numerically, renderers…

sure, and the quantity of code where true low-level access is actually required is still absolutely minuscule compared to that where it isn’t

permalink
report
parent
reply
2 points

similarly, “all of pointers” is unreasonable

“all of pointers” can have a lot of unexpected results

How? They go where they point, or to NULL, and can be moved by arithmetic. If you move them where they shouldn’t go, bad things happen. If you deference NULL, bad things happen. That’s it.

sure, and the quantity of code where true low-level access is actually required is still absolutely minuscule compared to that where it isn’t

If you need to address physical memory or something, that’s a small subset of this for sure. It also just lacks the overhead other languages introduce, though. Climate simulations could be in Java or Haskell, but usually aren’t AFIAK.

permalink
report
parent
reply
2 points

How? They go where they point, or to NULL, and can be moved by arithmetic. If you move them where they shouldn’t go, bad things happen. If you deference NULL, bad things happen. That’s it.

what part of that is explicit to how scanf works?

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

  • 6.6K

    Monthly active users

  • 988

    Posts

  • 38K

    Comments