you are viewing a single comment's thread
view the rest of the comments
[–] 67 points 2 years ago (18 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?

  • source
  • parent
  • hideshow 18 child comments
  • [+] -22 points 2 years ago (15 children)

    C++ is obsolete now that we have Go

  • source
  • parent
  • hideshow 15 child comments
  • [–] 15 points 2 years ago (4 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

  • source
  • parent
  • hideshow 4 child comments
  • [–] 2 points 2 years ago (3 children)

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

  • source
  • parent
  • hideshow 3 child comments
  • [–] 5 points 2 years 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.

  • source
  • parent
  • [–] 3 points 2 years ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 13 points 2 years ago (9 children)
  • [–] 3 points 2 years ago (7 children)

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

  • source
  • parent
  • hideshow 7 child comments
  • [–] 7 points 2 years ago (6 children)

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

  • source
  • parent
  • hideshow 6 child comments
  • [–] 10 points 2 years ago (5 children)
  • [–] 0 points 2 years ago (4 children)

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

  • source
  • parent
  • hideshow 4 child comments
  • [–] 4 points 2 years ago (3 children)

    I have already written eleventy billion lines of code.

  • source
  • parent
  • hideshow 3 child comments