Live data from Hacker News

It's time to halt starting any new projects in C/C++

twitter.com

41–50 of 929 posts

Re: It's time to halt starting any new projects in C/C++

#41

Earlier quoted context omitted.

Since Rust doesn’t have a stable ABI or separately compiled generics, wouldn’t dylibs necessarily be limited to exporting a C ABI?

My understanding (which might be wrong) is that you can rely on Rust not making incompatible ABI decisions between builds of the same optimization level on the same compiler version. In other words: you don't need to export a C ABI as long as you're able to enforce that every crate is built dynamically with the same compiler and flags. That is of course still a significant restriction!

ABI shenanigans are what killed the whole "off-the-shelf components" promise of C++ and object orientation.

They really made the same mistake again?

Re: It's time to halt starting any new projects in C/C++

#42
post #20

Earlier quoted context omitted.

To be fair, anything done in Python can be said about JS and under V8 will execute faster. But idk what OP is saying lol

Eh, the main thing that can be done in python is calling all the libraries that have been written for python. Can't do that from JS.

The big stuff is mostly done in C/C++ (because Python is slow) and bound to, so you could end up with basically the same bindings for JS/TS.

Re: It's time to halt starting any new projects in C/C++

#44

Earlier quoted context omitted.

My understanding (which might be wrong) is that you can rely on Rust not making incompatible ABI decisions between builds of the same optimization level on the same compiler version. In other words: you don't need to export a C ABI as long as you're able to enforce that every crate is built dynamically with the same compiler and flags. That is of course still a significant restriction!

ABI shenanigans are what killed the whole "off-the-shelf components" promise of C++ and object orientation. They really made the same mistake again?

I don't know how you arrived at that. C++ has the exact opposite ABI problems: it has a far-too-stable ABI that leaks thanks to poor abstractions (header files and template expansion in first-party code). Institutional C++ users have far too many implicit ABI dependencies to ever sign off on breakages, so C++ stdlib maintainers are unable to optimize much of the `std` namespace.

This in contrast to Rust, which actually does fulfill the "off-the-shelf" promise for most use cases. It's really refreshing to be able to do `cargo build` on nearly any host and get a single binary.

Edit: Jason Turner covers C++'s ABI woes excellently here: https://www.youtube.com/watch?v=By7b19YIv8Q

Re: It's time to halt starting any new projects in C/C++

#45
post #31

The C/C++ people hate it when you call it C/C++.

That's a fairly recent thing that some people do as a kind of virtue signaling. The "C/C++ Users Journal" was a very popular publication and no one took issue with its name. Nor do people take issue with Dr. Dobbs which has a "C/C++" section with articles from highly influential members of the C/C++ community. C++ is a complex language, so people invent ways to show how dedicated they are to it, and nowadays that mea…

I think it's also that idiomatic C++ is evolving further and further away from anything resembling C. So it's turning from C with extra features into a completely separate language that happens to interoperate well with C.

Re: It's time to halt starting any new projects in C/C++

#46
post #31

The C/C++ people hate it when you call it C/C++.

That's a fairly recent thing that some people do as a kind of virtue signaling. The "C/C++ Users Journal" was a very popular publication and no one took issue with its name. Nor do people take issue with Dr. Dobbs which has a "C/C++" section with articles from highly influential members of the C/C++ community. C++ is a complex language, so people invent ways to show how dedicated they are to it, and nowadays that mea…

C/C++ is undefined if C is an instance of an integral type.

Re: It's time to halt starting any new projects in C/C++

#47

Calling him the Azure CTO is strictly accurate, but HN readers probably know Mark Russinovich better as one of the primary developers of sysinternals[1]. I bring that up to highlight the weight of his opinion: Russinovich is legendary in terms of his systems programming contributions. [1]: https://en.wikipedia.org/wiki/Sysinternals

absolutely! came here to say just that.

also the excellent book "windows internals", which is kind of like the bsd red book, or the magic garden svr4 book, but for systems derived from the windows nt kernel.

but perhaps his best work is this: https://learn.microsoft.com/en-us/sysinternals/downloads/blu...

a screensaver that produces a realistic blue screen (kernel panic) for the version of the operating system and kernel that are installed, along with a simulated reboot that lands back into bsod as an infinite bootloop. extra bonus points because it also creates fake disk activity (for the era of hdd lights and hdds that made noise) for extra realism during the simulated boot.

Post reply on HN