Comment by zvrba

10 hours ago

What'd I tell to Bjarne:

- In the future, you'll carry in your pocket a computer more powerful than the sum of all computers currently present at the university

- The unchecked flat memory model of C will cause numerous security issues with sometimes grave consequences in the "real world"

- Follow the design of Standard ML (SML) and adapt it to systems programming (yeah, it appeared in 1983, but surely papers have been published before that)

- Do not even think about using unsigned types for sizes and get rid of implicit numeric conversions: if (v.size() - 1 < 0) fails on empty vector in today's C++

- Deterministic resource management is still important and is _the_ feature that C++ gets praised for.

- Lack of standard ABI will cause a lot of headaches and lost time.

- I would tell him about LLVM IR, .NET assemblies, metadata and encourage him to first standardize an intermediate format which the compiler could read and write. That'd ensure seamless interoperability between compilers and even other languages.

- Related to the above point: the header/source split will become a burden.

C++ created disasters on maintenance. The best could happen to C++ it's to be killed for once et all with Go as a systems' language and Rust maybe for the rest.

  • Go could have learnt a few lessons from the languages that predated it, instead like the authors originally did with C, it was more fun to create their own thing, and leave a few warts that will never be fixed as Go will never leave beyond 1.<increment counter>.

    At least it is much safer than C will ever be.

    Rust still needs to get rid of its C++ dependency on LLVM, and eventually GCC.

    • Go learnt everything from plan9 C and Limbo which are pretty much the refined versions of Unix, C and something being the core of Inferno.

      It's pretty much good enough maybe not for operating systems, but ideal for network-waiting daemons. It uses far more RAM than a core written in C, but for something built for the future, in 2030 it won't be that bloated. Specially when were are seeing Electron bound aberrations and even JS ridden crap under Gnome and Windows 11 for trivial tasks.

      1 reply →