this post was submitted on 27 Jan 2025
602 points (100.0% liked)

Programmer Humor

22444 readers
3199 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 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 229 points 2 months ago (1 children)

Option 3 means that the Javascript standards team dies either way, right? Number 3. No hesitation.

[–] [email protected] 69 points 2 months ago (3 children)

the c++ team is a sacrifice I'm willing to make. can we just shoot Brendan Eich in the head if he's not in there too?

[–] [email protected] 40 points 2 months ago

Push him onto the pressure pad. Make it his fault.

[–] [email protected] 14 points 2 months ago

I feel like all C++ does these days is badly and very slowly copy other languages. It wouldn't be a huge loss.

[–] [email protected] 2 points 2 months ago (2 children)

C++ is obsolete now that we have Go

[–] [email protected] 15 points 2 months ago (1 children)

C++ is better suited to lower level operations than Go, C++ can have huge control over the environment (allowing it to be run on bare metal with no OS) while Go is limited due to it using a garbage collector

If there was a replacement for C++, the best bet IMO would be Zig

[–] [email protected] 2 points 2 months ago (2 children)

As someone who knows neither of the three: Why Zig over Rust as a Cpp replacement?

[–] [email protected] 4 points 2 months ago

As someone who just picked through the Zig docs (take this with a mountain of salt), Zig has a few things going for it:

  • spec is simple and closer to C in scope
  • modern language design, toolchain, and overall ergonomics
  • Go-like struct & interface system
  • 1st-class C interoperability

Go foists co-routines on you and the runtime, and Rust has the borrow checker. Both of these things deeply impact language design, standard libraries, and the overall developer experience. So Zig might actually be a "more modern C" in many ways which makes it a contender. That said, it's not a 1:1 comparsion since it lacks everything else that C++ does: you'd have to re-envision your software designs as something other than OOP if that's what you're used to.

[–] [email protected] 3 points 2 months ago (1 children)

Rust has its own issues.

Before the memory safety craze, Rust was hyped as a functional programming language, meaning it not only has lambdas and monads, but also const by default, which will force you to rethink all your programming decisions. Also no classes, so you do even more rethinking.

[–] [email protected] 1 points 2 months ago

I don't just rethink my programming decision but all my life decisions every night. Seem like Rust is the perfect language for me.

[–] [email protected] 13 points 2 months ago (2 children)
[–] [email protected] 4 points 2 months ago (1 children)

I am currently in the process of completely rewriting the BSD kernel in go.

[–] [email protected] 6 points 2 months ago (1 children)

how are you handling the GC? how are you handling things like interrupts?

[–] [email protected] 10 points 2 months ago (1 children)
[–] [email protected] 1 points 2 months ago (1 children)

oh so you haven't actually done any of it.

[–] [email protected] 4 points 2 months ago (1 children)

I have already written eleventy billion lines of code.

[–] [email protected] 1 points 2 months ago (1 children)
[–] [email protected] 2 points 2 months ago (1 children)
[–] [email protected] 2 points 2 months ago
[–] [email protected] 1 points 2 months ago

I prefer the binary format over the text format of WASM.