892

Incase it doesn't show up:

you are viewing a single comment's thread
view the rest of the comments
[-] n3cr0@lemmy.world 35 points 2 months ago

Jokes aside, I struggle more with abominations like JavaScript and even Python.

[-] mogoh@lemmy.ml 24 points 2 months ago

Do you have a minute for our lord and savoir TypeScript?

[-] n3cr0@lemmy.world 12 points 2 months ago

As long as it can distinguish between int and uint - yesss!

[-] Zangoose@lemmy.world 19 points 2 months ago* (last edited 2 months ago)

TypeScript is still built on JavaScript, all numbers are IEEE-754 doubles 🙃

Edit: Actually I lied, there are BigInts which are arbitrarily precise integers but I don't think there's a way to make them unsigned. There also might be a byte-array object that stores uint8 values but I'm not completely sure if I'm remembering that correctly.

[-] void_star@lemmy.world 12 points 2 months ago

Python has its quirks, but it’s much much cleaner than js or c++, not fair to drag it down with them imo

[-] tunetardis@lemmy.ca 10 points 2 months ago

I think the thing with C++ is they have tried to maintain backward compatibility from Day 1. You can take a C++ program from the 80s (or heck, even a straight up C program), and there's a good chance it will compile as-is, which is rather astonishing considering modern C++ feels like a different language.

But I think this is what leads to a lot of the complexity as it stands? By contrast, I started Python in the Python 2 era, and when they switched to 3, I was like "Wow, did they just break hello world?" It's a different philosophy and has its trade-offs. By reinventing itself, it can get rid of the legacy cruft that never worked well or required hacky workarounds, but old code will not simply run under the new interpreter. You have to hope your migration tools are up to the task.

[-] 0x0@programming.dev 4 points 2 months ago
[-] tunetardis@lemmy.ca 8 points 2 months ago

There were breaking changes between C and C++ (and some divergent evolution since the initial split) as well as breaking changes between different releases of C++ itself. I am not saying these never happened, but the powers that be controlling the standard have worked hard to minimize these for better or worse.

If I took one of my earliest ANSI C programs from the 80s and ran it through a C++23 compiler, I would probably need to remove a bunch of register statements and maybe check if an assumption of 16-bit int is going to land me in some trouble, but otherwise, I think it would build as long as it's not linking in any 3rd party libraries.

[-] jaybone@lemmy.world 2 points 2 months ago

The terse indexing and index manipulation gets a bit Perl-ish and write-only to me. But other than that I agree.

this post was submitted on 02 Sep 2024
892 points (99.1% liked)

Programmer Humor

32479 readers
295 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS